Skip to content

Commit 90c1bc1

Browse files
authored
Merge pull request #8 from tnwang/develop
Upcoming documentation to support application bootstrapping. Accepted now that 1.4 tile is live.
2 parents 3b84c24 + e9884da commit 90c1bc1

File tree

5 files changed

+176
-0
lines changed

5 files changed

+176
-0
lines changed

Diff for: README.md

+28
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Set the Auth Server location as the value of the auth_domain environment variabl
3838

3939
`cf set-env <RESOURCE_SERVER_APP_NAME> AUTH_SERVER <AUTH_SERVER_LOCATION>`
4040

41+
For example, for a given SSO service plan/UAA identity zone, the location would be `https://subdomain.login.my-domain.org`
42+
4143
It has three API endpoints:
4244
* `GET /todo` to list TODO items. Requires the user to have `todo.read` scope.
4345
* `POST /todo` to create a TODO item. Requires `todo.write` scope. Example body: `{"todo":"<content>"}`
@@ -61,3 +63,29 @@ Follow the steps [here](http://docs.pivotal.io/p-identity/manage-resources.html)
6163
The authenticated user should also have the scopes `todo.read` and `todo.write`.
6264

6365
NOTE: If a user doesn't have these scopes, contact your local admin to grant these scopes to that user.
66+
67+
# Bootstrap Application Client Configurations for the Pivotal Single Sign-On Service Instance
68+
Beginning in SSO 1.4.0, you can use the following values your application's manifest to bootstrap client configurations for your applications automatically when binding or rebinding your application to the service instance. These values will be automatically populated to the client configurations for your application through CF environment variables.
69+
70+
When you specify your own scopes and authorities, consider including openid for scopes on auth code, implicit, and password grant type applications, and uaa.resource for client credentials grant type applications, as these will not be provided if they are not specified.
71+
72+
The table below provides a description and the default values. Further details and examples are provided in the sample application manifests.
73+
74+
| Property Name | Description | Default |
75+
| ------------- | ------------- | ------------- |
76+
| name | Name of the application | (N/A - Required Value) |
77+
| GRANT_TYPE | Allowed grant type for the application through the SSO service - only one grant type per application is supported by SSO | authorization_code |
78+
| SSO_IDENTITY_PROVIDERS | Allowed identity providers for the application through the SSO service plan | uaa |
79+
| SSO_REDIRECT_URIS | Comma separated whitelist of redirection URIs allowed for the application - Each value must start with http:// or https:// | (Will always include the application route) |
80+
| SSO_SCOPES | Comma separated list of scopes that belong to the application and are registered as client scopes with the SSO service. This value is ignored for client credential grant type applications. | openid |
81+
| SSO_AUTO_APPROVED_SCOPES | Comma separated list of scopes that the application is automatically authorized when acting on behalf of users through SSO service | <Defaults to existing scopes/authorities> |
82+
| SSO_AUTHORITIES | Comma separated list of authorities that belong to the application and are registered as client authorities with the SSO service. Authorities are restricted to the space they were originally created. Privileged identity zone/plan administrator scopes (e.g. scim.read, idps.write) cannot be bootstrapped and must be assigned by zone/plan administrators. This value is ignored for any grant type other than client credentials. | uaa.resource |
83+
| SSO_REQUIRED_USER_GROUPS | Comma separated list of groups a user must have in order to authenticate successfully for the application | (No value) |
84+
| SSO_ACCESS_TOKEN_LIFETIME | Lifetime in seconds for the access token issued to the application by the SSO service | 43200 |
85+
| SSO_REFRESH_TOKEN_LIFETIME | Lifetime in seconds for the refresh token issued to the application by the SSO service | 2592000 (not used for client credentials) |
86+
| SSO_RESOURCES | Resources that the application will use as scopes/authorities for the SSO service to be created during bootstrapping if they do not already exist - The input format can be referenced in the provided sample manifest. Note that currently all permissions within the same top level permission (e.g. todo.read, todo.write) must be specified in the same application manifest. Currently you cannot specify additional permissions in the same top level permission (e.g. todo.admin) in additional application manifests.| (No value) |
87+
| SSO_ICON | Application icon that will be displayed next to the application name on the Pivotal Account dashboard if show on home page is enabled - do not exceed 64kb | (No value) |
88+
| SSO_LAUNCH_URL | Application launch URL that will be used for the application on the Pivotal Account dashboard if show on home page is enabled | (Application route) |
89+
| SSO_SHOW_ON_HOME_PAGE | If set to true, the application will appear on the Pivotal Account dashboard with the corresponding icon and launch URL| True |
90+
91+
To remove any variables set through bootstrapping, you must use `cf unset-env <APP_NAME> <PROPERTY_NAME>` and rebind the application.

Diff for: authcode/manifest.yml

+37
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,42 @@ applications:
66
path: build/libs/authcode.jar
77
env:
88
SKIP_SSL_VALIDATION: "true"
9+
10+
# Grant type to be set for the application's client configurations - Only one grant type per application is supported by SSO
911
GRANT_TYPE: authorization_code
12+
13+
# Identity provider(s) to be set for the application's client configurations
1014
SSO_IDENTITY_PROVIDERS: uaa
15+
16+
# The following are bootstrap configurations you may use to automatically create client configurations in the SSO service for your application if the configurations do not exist. These configurations take effect when binding or rebinding to the SSO, and will overwrite existing client configurations if any. The values provided below are examples.
17+
18+
# Whitelist of redirect URI(s) allowed for the application. This value must start with http:// or https://
19+
# SSO_REDIRECT_URIS: https://my-domain-here.domain.org
20+
21+
# Client scope(s) for the application, not used for client credentials grant type
22+
# SSO_SCOPES: openid, todo.read, todo.write
23+
24+
# Client scope(s) for the application that are automatically authorized when acting on behalf of a user
25+
# SSO_AUTO_APPROVED_SCOPES: openid, todo.read
26+
27+
# Client authorities for the application, only used for client credentials grant type
28+
# SSO_AUTHORITIES: openid, uaa.resource, todo.read, todo.write
29+
30+
# List of groups a user must have in order to authenticate successfully for the application
31+
# SSO_REQUIRED_USER_GROUPS: my_group_here
32+
33+
# Lifetime in seconds of the application's access token
34+
# SSO_ACCESS_TOKEN_LIFETIME: 300
35+
36+
# Lifetime in seconds of the application's refresh token
37+
# SSO_REFRESH_TOKEN_LIFETIME: 1800
38+
39+
# Resource(s) that the application will use as scopes/authorities to be created if they do not already exist during bootstrapping
40+
# SSO_RESOURCES: |
41+
# todo.read: Read Objects
42+
# todo.write: <Blank for no description>
43+
44+
# Application icon with the application name and launch URL that will be displayed on the Pivotal Account dashboard if configured to show
45+
# SSO_ICON: <base64 encoded image - do not exceed 64kb>
46+
# SSO_LAUNCH_URL: <url>
47+
# SSO_SHOW_ON_HOME_PAGE: <true/false>

Diff for: client_credentials/manifest.yml

+37
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,42 @@ applications:
66
path: build/libs/client_credentials.jar
77
env:
88
SKIP_SSL_VALIDATION: "true"
9+
10+
# Grant type to be set for the application's client configurations - Only one grant type per application is supported by SSO
911
GRANT_TYPE: client_credentials
12+
13+
# Identity provider(s) to be set for the application's client configurations
1014
SSO_IDENTITY_PROVIDERS: uaa
15+
16+
# The following are bootstrap configurations you may use to automatically create client configurations in the SSO service for your application if the configurations do not exist. These configurations take effect when binding or rebinding to the SSO, and will overwrite existing client configurations if any. The values provided below are examples.
17+
18+
# Whitelist of redirect URI(s) allowed for the application. This value must start with http:// or https://
19+
# SSO_REDIRECT_URIS: https://my-domain-here.domain.org
20+
21+
# Client scope(s) for the application, not used for client credentials grant type
22+
# SSO_SCOPES: openid, todo.read, todo.write
23+
24+
# Client scope(s) for the application that are automatically authorized when acting on behalf of a user
25+
# SSO_AUTO_APPROVED_SCOPES: openid, todo.read
26+
27+
# Client authorities for the application, only used for client credentials grant type
28+
# SSO_AUTHORITIES: openid, uaa.resource, todo.read, todo.write
29+
30+
# List of groups a user must have in order to authenticate successfully for the application
31+
# SSO_REQUIRED_USER_GROUPS: my_group_here
32+
33+
# Lifetime in seconds of the application's access token
34+
# SSO_ACCESS_TOKEN_LIFETIME: 300
35+
36+
# Lifetime in seconds of the application's refresh token
37+
# SSO_REFRESH_TOKEN_LIFETIME: 1800
38+
39+
# Resource(s) that the application will use as scopes/authorities to be created if they do not already exist during bootstrapping
40+
# SSO_RESOURCES: |
41+
# todo.read: Read Objects
42+
# todo.write: <Blank for no description>
43+
44+
# Application icon with the application name and launch URL that will be displayed on the Pivotal Account dashboard if configured to show
45+
# SSO_ICON: <base64 encoded image - do not exceed 64kb>
46+
# SSO_LAUNCH_URL: <url>
47+
# SSO_SHOW_ON_HOME_PAGE: <true/false>

Diff for: implicit/manifest.yml

+37
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,42 @@ applications:
66
path: build/libs/implicit.jar
77
env:
88
SKIP_SSL_VALIDATION: "true"
9+
10+
# Grant type to be set for the application's client configurations - Only one grant type per application is supported by SSO
911
GRANT_TYPE: implicit
12+
13+
# Identity provider(s) to be set for the application's client configurations
1014
SSO_IDENTITY_PROVIDERS: uaa
15+
16+
# The following are bootstrap configurations you may use to automatically create client configurations in the SSO service for your application if the configurations do not exist. These configurations take effect when binding or rebinding to the SSO, and will overwrite existing client configurations if any. The values provided below are examples.
17+
18+
# Whitelist of redirect URI(s) allowed for the application. This value must start with http:// or https://
19+
# SSO_REDIRECT_URIS: https://my-domain-here.domain.org
20+
21+
# Client scope(s) for the application, not used for client credentials grant type
22+
# SSO_SCOPES: openid, todo.read, todo.write
23+
24+
# Client scope(s) for the application that are automatically authorized when acting on behalf of a user
25+
# SSO_AUTO_APPROVED_SCOPES: openid, todo.read
26+
27+
# Client authorities for the application, only used for client credentials grant type
28+
# SSO_AUTHORITIES: openid, uaa.resource, todo.read, todo.write
29+
30+
# List of groups a user must have in order to authenticate successfully for the application
31+
# SSO_REQUIRED_USER_GROUPS: my_group_here
32+
33+
# Lifetime in seconds of the application's access token
34+
# SSO_ACCESS_TOKEN_LIFETIME: 300
35+
36+
# Lifetime in seconds of the application's refresh token
37+
# SSO_REFRESH_TOKEN_LIFETIME: 1800
38+
39+
# Resource(s) that the application will use as scopes/authorities to be created if they do not already exist during bootstrapping
40+
# SSO_RESOURCES: |
41+
# todo.read: Read Objects
42+
# todo.write: <Blank for no description>
43+
44+
# Application icon with the application name and launch URL that will be displayed on the Pivotal Account dashboard if configured to show
45+
# SSO_ICON: <base64 encoded image - do not exceed 64kb>
46+
# SSO_LAUNCH_URL: <url>
47+
# SSO_SHOW_ON_HOME_PAGE: <true/false>

Diff for: password/manifest.yml

+37
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,42 @@ applications:
66
path: build/libs/password.jar
77
env:
88
SKIP_SSL_VALIDATION: "true"
9+
10+
# Grant type to be set for the application's client configurations - Only one grant type per application is supported by SSO
911
GRANT_TYPE: password
12+
13+
# Identity provider(s) to be set for the application's client configurations
1014
SSO_IDENTITY_PROVIDERS: uaa
15+
16+
# The following are bootstrap configurations you may use to automatically create client configurations in the SSO service for your application if the configurations do not exist. These configurations take effect when binding or rebinding to the SSO, and will overwrite existing client configurations if any. The values provided below are examples.
17+
18+
# Whitelist of redirect URI(s) allowed for the application. This value must start with http:// or https://
19+
# SSO_REDIRECT_URIS: https://my-domain-here.domain.org
20+
21+
# Client scope(s) for the application, not used for client credentials grant type
22+
# SSO_SCOPES: openid, todo.read, todo.write
23+
24+
# Client scope(s) for the application that are automatically authorized when acting on behalf of a user
25+
# SSO_AUTO_APPROVED_SCOPES: openid, todo.read
26+
27+
# Client authorities for the application, only used for client credentials grant type
28+
# SSO_AUTHORITIES: openid, uaa.resource, todo.read, todo.write
29+
30+
# List of groups a user must have in order to authenticate successfully for the application
31+
# SSO_REQUIRED_USER_GROUPS: my_group_here
32+
33+
# Lifetime in seconds of the application's access token
34+
# SSO_ACCESS_TOKEN_LIFETIME: 300
35+
36+
# Lifetime in seconds of the application's refresh token
37+
# SSO_REFRESH_TOKEN_LIFETIME: 1800
38+
39+
# Resource(s) that the application will use as scopes/authorities to be created if they do not already exist during bootstrapping
40+
# SSO_RESOURCES: |
41+
# todo.read: Read Objects
42+
# todo.write: <Blank for no description>
43+
44+
# Application icon with the application name and launch URL that will be displayed on the Pivotal Account dashboard if configured to show
45+
# SSO_ICON: <base64 encoded image - do not exceed 64kb>
46+
# SSO_LAUNCH_URL: <url>
47+
# SSO_SHOW_ON_HOME_PAGE: <true/false>

0 commit comments

Comments
 (0)