Skip to content

Commit ed4b7e5

Browse files
committed
Created a quick start guide to have authcode and resource server immediately up and running with bootstrapping.
1 parent 90c1bc1 commit ed4b7e5

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

Diff for: README.md

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ Follow the steps [here](http://docs.pivotal.io/p-identity/configure-apps/index.h
2727

2828
Restart your application after binding the service using Apps Manager or CF CLI.
2929

30+
## <a name="quick-start">Quick Start</a>: Authcode Sample App and Resource Server on SSO
31+
32+
As an alternative to Steps 1 and 2 above, you can also quickly deploy the authcode and resource server sample applications using application bootstrapping with the steps below. You can read more about these topics in the following sections.
33+
34+
1. First, make sure you created a [Service Plan](https://docs.pivotal.io/p-identity/manage-service-plans.html) for your Org as well as a [Service Instance](https://docs.pivotal.io/p-identity/manage-service-instances.html) named `sample-instance` for your Space, and login via CF CLI as a Space Developer into the required Org and Space.
35+
36+
2. Replace `manifest.yml` with `manifest.yml.quick-start` for the *authcode* and *resource-server* projects and update the `RESOURCE_URL` and `AUTH_URL` values in the manifest with your plan and domain values.
37+
38+
3. Build (`./gradlew build`) and push (`cf push`) both the *authcode* and *resource-server* projects to your Space where you are logged in as a Space Developer.
39+
40+
The sample application and resource server be available immediately bound to the SSO Service on start-up. You can then test the applications by creating test users with the `todo.read` and `todo.write` scopes for your plan using the steps [here](https://docs.pivotal.io/p-identity/configure-id-providers.html#add-to-int).
3041

3142
# Resource Server Sample Application
3243

Diff for: authcode/manifest.yml.quick-start

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
applications:
3+
- name: authcode-sample
4+
memory: 512M
5+
instances: 1
6+
path: build/libs/authcode.jar
7+
services:
8+
- sample-instance
9+
env:
10+
SKIP_SSL_VALIDATION: "true"
11+
RESOURCE_URL: https://resource-server-sample.<your-domain>.com
12+
13+
# Grant type to be set for the application's client configurations - Only one grant type per application is supported by SSO
14+
GRANT_TYPE: authorization_code
15+
16+
# Identity provider(s) to be set for the application's client configurations
17+
SSO_IDENTITY_PROVIDERS: uaa
18+
19+
# 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.
20+
21+
# Whitelist of redirect URI(s) allowed for the application. This value must start with http:// or https://
22+
# SSO_REDIRECT_URIS: https://my-domain-here.domain.org
23+
24+
# Client scope(s) for the application, not used for client credentials grant type
25+
SSO_SCOPES: openid, todo.read, todo.write
26+
27+
# Client scope(s) for the application that are automatically authorized when acting on behalf of a user
28+
# SSO_AUTO_APPROVED_SCOPES: openid, todo.read
29+
30+
# Client authorities for the application, only used for client credentials grant type
31+
# SSO_AUTHORITIES: openid, uaa.resource, todo.read, todo.write
32+
33+
# List of groups a user must have in order to authenticate successfully for the application
34+
# SSO_REQUIRED_USER_GROUPS: my_group_here
35+
36+
# Lifetime in seconds of the application's access token
37+
# SSO_ACCESS_TOKEN_LIFETIME: 300
38+
39+
# Lifetime in seconds of the application's refresh token
40+
# SSO_REFRESH_TOKEN_LIFETIME: 1800
41+
42+
# Resource(s) that the application will use as scopes/authorities to be created if they do not already exist during bootstrapping
43+
SSO_RESOURCES: |
44+
todo.read: Read to list
45+
todo.write: Write to list
46+
47+
# Application icon with the application name and launch URL that will be displayed on the Pivotal Account dashboard if configured to show
48+
# SSO_ICON: <base64 encoded image - do not exceed 64kb>
49+
# SSO_LAUNCH_URL: <url>
50+
# SSO_SHOW_ON_HOME_PAGE: <true/false>

Diff for: resource-server/manifest.yml.quick-start

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
applications:
3+
- name: resource-server-sample
4+
memory: 512M
5+
instances: 1
6+
path: build/libs/resource-server.jar
7+
env:
8+
SKIP_SSL_VALIDATION: "true"
9+
AUTH_SERVER: https://<plan-auth-domain>.login.<your-domain>.com

0 commit comments

Comments
 (0)