Get Started With the UAA Service
UAA Security Service Setup
To begin using any secure Predix platform service, you must set up a UAA service instance as the trusted issuer.
Task Roadmap
# | Task | Description |
---|---|---|
1 | (Optional) Configure your proxy settings if necessary. | Depending on your location and network configuration, you may need to configure your proxy settings to access remote resources. See t_defining_proxy_connections_to_remote_resources.html#task_97cc6304-e168-459d-9952-a45708ff8361. |
2 | (Optional) Deploy a Predix Hello World Web application. | t_Deploying_an_App_to_Cloud_Foundry.html#task_xwn_lvb_vx. |
3 | Create the UAA service instance. | See uaas-get-started.html#task_y1l_vms_2s. |
4 | Create OAuth2 clients to setup access to your service authenticated using UAA. | When you create a UAA instance, an admin client is automatically created for you to access UAA for additional configuration. You can create a new client for your service instance with specific scopes. If an Oauth2 client already exists, you can update the client to add your service instance. See uaas-managing-clients.html#task_79a81b74-552e-4f74-abfc-bd37e6adac87. |
5 | Create Groups to set up the required permissions for the users. | A group represents the privileges of a user. |
6 | Create Users in the UAA instance. | For UAA to authenticate the users, the users must first be created in UAA. You can either create users locally within UAA or federate to an external identity provider. For creating users locally, see uaas-managing-users.html#task_lrr_n5w_fs. To set up federated identity with UAA, see Managing Identity Providers. |
7 | Bind your application to the service instance. | See uaas-get-started.html#task_155dd0e5-ca06-45d3-833e-686a71f0ca98. |
Creating a UAA Service Instance
You can create multiple instances of the UAA service in your space.
About This Task
As a best practice, first delete any older unused instances before creating a new one.
Procedure
Results
Your UAA instance is created with the following specifications:
- A client identifier (
admin
).Note: Anadmin
client is required for bootstrap purposes. You can create additional clients to use with your application. - A client secret (that you specified while creating the service).
To retrieve additional details of your instance, you can bind an application to your instance.
Using the Command Line to Create a UAA Service Instance
Optional procedure for using the command line instead of the graphical user interface to create a UAA service instance.
About This Task
You can create up to 10 instances of UAA service in your space. If you need additional instances, you must delete an older unused instance and create a new one.
Procedure
Results
Your UAA instance is created with the following specification:
-
A client identifier (
admin
).Note: Anadmin
client is created for bootstrap purposes. You can create additional clients to use with your application. -
A client secret (that you specified while creating the service).
To retrieve additional details of your instance, you can bind an application to your instance.
Example
Create a predix-uaa service instance with client secret as admin and sub-domain as ge-digital:
cf cs predix-uaa tiered test-1 -c '{"adminClientSecret":"admin","subdomain":"ge-digital"}'
This is how it appears in VCAP SERVICES when using the cf env <app_name>
command:
"VCAP_SERVICES": {
"predix-uaa": [
{
"credentials": {
"dashboardUrl": "https://uaa-dashboard.run.asv-pr.ice.predix.io/#/login/04187eb1-e0cf-4874-8218-9fb77a8b4ed9",
"issuerId": "https://04187eb1-e0cf-4874-8218-9fb77a8b4ed9.predix-uaa.run.asv-pr.ice.predix.io/oauth/token",
"subdomain": "04187eb1-e0cf-4874-8218-9fb77a8b4ed9",
"uri": "https://04187eb1-e0cf-4874-8218-9fb77a8b4ed9.predix-uaa.run.asv-pr.ice.predix.io",
"zone": {
"http-header-name": "X-Identity-Zone-Id",
"http-header-value": "04187eb1-e0cf-4874-8218-9fb77a8b4ed9"
}
},
"label": "predix-uaa",
"name": "testuaa",
"plan": "Tiered",
"provider": null,
"syslog_drain_url": null,
"tags": [],
"volume_mounts": []
}
],
Binding an Application to the UAA Instance
About This Task
You must bind your application to your UAA instance to provision its connection details in the VCAP_SERVICES environment variable. The Cloud Foundry runtime uses the VCAP_SERVICES environment variable to communicate with a deployed application about its environment.
You can retrieve the following UAA instance details from the VCAP_SERVICES environment variable:
-
A
dashboard_url
for your instance. You can use this URL to access the dashboard for managing this instance of UAA. -
A
subdomain
that specifies a sub-domain you can use in addition to the domain created for UAA. -
A
uaa_instance_uri
for your instance. -
A
uaa_instance_issuerId
for your instance. TheissuerID
is required when you create an instance of another service that uses your UAA instance for authentication. -
A
uaa_instance_GUID
is thezoneID
for your instance.
Procedure
Unbinding the UAA Instance From Your Application
Procedure
cf unbind-service <your_app_name> <uaa_instance_name>
The service instance is unbound from the application, and the following message is returned:
Unbinding app predix-service from service userX in org predix-platform / space predix as userx@ge.com...
OK
Deleting a UAA Instance
Procedure
cf delete-service predix-uaa <uaa_instance_name>