Managing Native Services
You can register a native service in Huawei Cloud Astro Zero in either of the following ways: 1. Choose Development Configuration > Native Services > Registration in the environment configuration page. 2. Register a native service in Guidance on the native service development page.
Installing Native Services
Before registering a native service, perform the following operations to install the native service.
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- In the upper left corner of the page, click
and choose Environments > Environment Configuration.
- In the navigation pane, choose Application Management > Installation Management > Package Installation.
- On the displayed page, click New.
- Drag the installation package of the native service to be installed to the corresponding position and click Install.
If you need to check the changes of object attributes in the package, select Check Object Attribute Changes and click Check & Install.
In the displayed dialog box, determine whether to register and install the native service immediately as required. You can also register a native service by referring to Registering a Native Service.
Registering a Native Service
After registering a native service, you can call its APIs in scripts and flows or expose it to third-party systems.
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- In the upper left corner of the page, click
and choose Environments > Environment Configuration.
- In the navigation pane, choose Development Configuration > Native Services > Registration.
- Click Register Service. In the displayed dialog box, select the native service installed in Installing Native Services from the Service drop-down list.
- Set parameters by referring to Table 1 and click the confirm button.
Table 1 Parameters for registering a native service Parameter
Description
Name
Name of the service to be registered.
API Address
Ingress access address, which must contain the protocol HTTP or HTTPS.
Auth Type
Authentication mode for accessing the native service.
- No Auth: Authentication is not required.
- User name and password: If you select this mode, you need to set the username and password.
- JWT: If you select this mode, you need to configure a specific JWT Secret.
- OAuth 2.0: If you select this mode, you need to set the following parameters:
- Grant Type: authorization mode, which is the value of grant_type in OAuth 2.0. You can choose either client credentials or password.
- Auth URL: path for requesting the access token. The service must comply with RFC 6749.
- Client ID: client_id, which is mandatory in client mode.
- Client Secret: client_secret, which is mandatory in client mode.
- User name: This parameter needs to be set only when the authorization mode is set to password.
- Password: This parameter needs to be set only when the authorization mode is set to password.
All registered native services are displayed in the registered service list.
Deregistering a Native Service
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- In the upper left corner of the page, click
and choose Environments > Environment Configuration.
- In the navigation pane, choose Development Configuration > Native Services > Registration.
- In the registered service list, click the registered native service.
- On the native service registration details page, you can cancel the registration of the native service.
Managing Native Services
You can view the basic information, methods, models, and public APIs of native services, and configure access permissions for public APIs on the service management page.
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- In the upper left corner of the page, click
and choose Environments > Environment Configuration.
- In the navigation pane, choose Development Configuration > Native Services > Service Management.
- In the native service list, click the corresponding native service.
On the service details page, you can perform the following operations:
- Basic Information: View basic information about the native service, such as the label and name.
- Service APIs: View the methods and model objects provided by the native service.
- Public APIs: View the public APIs defined by the native service and configure the access permissions for the public APIs. The public APIs cannot be modified.
- (Optional) Configure the access permissions for the public APIs.
When the access permissions for the APIs are configured, only users/portal users with the permission credentials can call the APIs.
- Choose Maintenance from the main menu of the Huawei Cloud Astro Zero environment configuration page.
- In the navigation pane, choose Global Elements > Service Permissions Credentials. Then click Create.
- Set Label and Name (for example, Native), and click Save.
- On the main menu, choose Configuration > Development Configuration > Native Services > Service Management. On the page that is displayed, click the corresponding native service.
- Choose Public APIs and click the API to be configured.
- In the Service Permissions Credential area, click Edit.
- Select the permission previously created on the left, click
to add it to the right, and click Save.
- In the navigation pane, choose User Security > Profiles and create profiles by referring to Creating a Service Permission Credential. On the details page of the created profile, click the Service Permissions Credentials tab, click
, select the access permission for Native, and click
.
- Grant the profile to a user or portal user.
In the navigation pane, choose User Security > Users, or choose Maintenance > Global Elements > Portal Users. Click the corresponding user or portal user. In Permission Sets Information on the details page, click Edit, select the profile created in 5.c, and click Save.
- If no profile is configured for a portal user, the preset Portal User Profile will be granted to the portal user by default. If a portal user needs to call the public API of a native service, you need to add the service permission credential to the portal user and the API.
- If a user has been granted with a profile, you do not need to repeat 5.h and 5.i. On the Service Permissions Credentials tab page of the corresponding profile, select the access permission for Native.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot