Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| blocks:sso:okta [2019-03-12 15:28] – max | blocks:sso:okta [2026-11-13 10:15] (current) – Removed as not supprorted (yet) in Blocks 8 admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====Okta==== | ||
| - | - Login to your okta account and navigate to the admin pages. | ||
| - | - Add an application by clicking " | ||
| - | - Give you application a name and enter " | ||
| - | - Select the "Sign On" tab at the top of your application page. Scroll down and press the " | ||
| - | * {{: | ||
| - | - Click on the " | ||
| - | - Click the "Add Group" button and give it the name of " | ||
| - | * BlocksRoleAdmin | ||
| - | * BlocksRoleManager | ||
| - | * BlocksRoleCreator | ||
| - | * BlocksRoleEditor | ||
| - | * BlocksRoleContributor | ||
| - | * BlocksRoleStaff | ||
| - | - Click on the " | ||
| - | - At the top, click the " | ||
| - | - Click on the " | ||
| - | |||
| - | ====Blocks specific steps==== | ||
| - | |||
| - | - Open your Blocks configuration file on your Blocks server and add the " | ||
| - | * < | ||
| - | server: | ||
| - | auth: | ||
| - | urlResolver: | ||
| - | ajaxRequestResolver: | ||
| - | callbackUrl: | ||
| - | rolesOwner: attributes | ||
| - | rolesPath: roles | ||
| - | rolesMapping: | ||
| - | BlocksRoleAdmin: | ||
| - | BlocksRoleManager: | ||
| - | BlocksRoleCreator: | ||
| - | BlocksRoleEditor: | ||
| - | BlocksRoleContributor: | ||
| - | BlocksRoleStaff: | ||
| - | clients: | ||
| - | - org.pac4j.oidc.client.OidcClient: | ||
| - | configuration: | ||
| - | discoveryURI: | ||
| - | clientId: [CLIENT-ID] | ||
| - | secret: [CLIENT-SECRET] | ||
| - | clientAuthenticationMethod: | ||
| - | scope: openid profile groups | ||
| - | servlet: | ||
| - | security: | ||
| - | - matchers: internalMatcher | ||
| - | clients: OidcClient | ||
| - | authorizers: | ||
| - | </ | ||
| - | - Start Blocks and go to "/ | ||
| - | |||
| - | ===Role Mapping=== | ||
| - | |||
| - | When the roles (through groups) you've added to your Okta configuration does not match the roles used by blocks, as per our description in the section above (step 6). You can add role mapping to the Blocks configuration file. You do this by defining a server.auth.rolesMapping parameter where the keys are the roles of your Okta configuration and the values the roles Blocks know about. For example: | ||
| - | < | ||
| - | rolesMapping: | ||
| - | BlocksRoleAdmin: | ||
| - | BlocksRoleManager: | ||
| - | BlocksRoleCreator: | ||
| - | BlocksRoleEditor: | ||
| - | BlocksRoleContributor: | ||
| - | BlocksRoleStaff: | ||
| - | </ | ||
| - | This mapping is already included in the configuration example, but it can be a good thing to keep in mind if your roles look different from what we configured in step 6 of the section above. | ||