download rhsso from https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=44851
unzip rh-sso-7.0.0.zip
./add-user-keycloak.sh -u <username>
- From the directory rh-sso-7.0 execute
bin/standalone.sh
This will start up the sso instance - To expose the console on a public domain follow the next steps
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
- From the same directory the binary is installed execute
./ngrok http 8080
- Copy the http domain and access the console from the browser at
<ngrok_domain/server_domain>/auth/admin
- Create a new realm (different from Master)
- Set up Tokens Policies (Realm Settings > Tokens) - e.g. to configure access token TTL
- Set up Initial Access Tokens. This is necessary to synchronise client registrations between 3scale and Red Hat Single Sign-On.
- Define Expiration - This will determine how long the access token used to register clients from APIcast will be valid for, so make sure to choose a long lived value unless you want to be changing this token often.
- Define Count - This will determine how many clients can be registered using this access token, make sure to choose a large value unless you want to be changing this token often.
- Create some test End-Users
oc new-app -f apicast-oidc.yml
oc secret new-basicauth apicast-configuration-url-secret --password=https://<access_token/provider_key>@<your_domain>-admin.3scale.net
- Add the ENV variable RHSSO_ENDPOINT with the domain of the sso instance you just deployed to the deployment config for example:
http://rh-sso.com/auth/realms/<your_realm>
- Create a client in 3scale and make sure to add the redirect URL parameter. This could be Postman for example.
- You will need to synchronise this client with your RH SSO instance manually. Use the follwing example API request:
curl -v -X POST \
-d '{ "clientId": "<client_id>", "secret": "<client_secret>","redirectUris":["https://www.getpostman.com/oauth2/callback"] }' \
-H "Content-Type:application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <initial_access_token>" \
http://<rhsso_domain>/auth/realms/<your_realm>/clients-registrations/default