IdP
| Component | Available in version |
|---|---|
| Organization | v1.0 |
An Organization can let users sign in via an external identity provider instead of, or alongside, native Synkzone accounts. Two kinds of identity provider are supported: a Generic OIDC provider (any corporate IdP speaking OpenID Connect), and Swedish BankID (via GrandID). This is an optional plugin.
Info
Most Organizations using an external IdP for sign-in also use SCIM to provision the underlying user accounts from the same directory. The two are configured independently, but are commonly set up together.
Creating Synkzone users
Users can be created in Synkzone in three ways. The possible methods are configured by the operator except for manual creation that is always enabled. The options are:
- Automatic provisioning with SCIM
- Automatic creation at first sign-in
- Manual creation
Automatic provisioning with SCIM
Users are created before they ever sign in. When a user is assigned to the application in the identity provider (IdP), the IdP creates the account in Synkzone through SCIM. When the user is unassigned or offboarded, the IdP deactivates the account.
Best for: organizations that want the IdP to control who has access, including automatic offboarding.
Automatic creation at first sign-in
The account is created the first time a user selects "Sign in with external IdP" and authenticates successfully. No setup is needed on the IdP beyond the sign-in connection, but Synkzone only learns about the user when they sign in.
Any user who authenticates successfully through the IdP gets an account, all accounts created this way are of authorization level External. The user authorization level can be adjusted by an administrator when the account is created.
Best for: simple setups where pre-provisioning isn’t needed.
Note: Because the IdP is not notified about changes, users removed in the IdP are not deactivated automatically in Synkzone. That means they can no longer sign in through the IdP, but the Synkzone account remains active until an administrator deactivates it.
Manual creation
An administrator or group administrator creates users directly in Synkzone. The account is not linked to an IdP unless the field "External user name" is filled with the correct user identifier from the IdP.
Best for: organizations that want to manage users independently from any other IT environment, small environments, test accounts, or users who are not in the IdP (for example external partners or service accounts).
How users are linked
Each user in Synkzone is linked to their identity in the IdP through the field externalUserName. When a user signs in with the external IdP, or when the IdP provisions or deactivates a user through SCIM, Synkzone uses this value to find the matching account.
The link is unique: only one active Synkzone user account can have a given externalUserName at any time. This prevents two accounts from being tied to the same person in the IdP, and means a sign-in or provisioning request always resolves to exactly one account.
The field can be edited manually by the user when it's signed in to the Synkzone user account.
Comparison
| SCIM | Created at first sign-in | Manual | |
|---|---|---|---|
| When the user is created | When assigned in the IdP | At first successful sign-in | When an administrator adds them |
| Created by | The IdP | The user (automatically) | An administrator |
| Initial authorization level | External/Internal | External | Any |
| Requires IdP setup | SCIM provisioning and sign-in | Sign-in only | None |
| Automatic deactivation | Yes | No | No |
| Groups can be provisioned | Yes | No | No |
| Admin effort | Low after setup | Low | High, grows with users |
Tip
If you use an IdP, SCIM is recommended since it is the only method that handles offboarding automatically.
Info
The inital authorization level can be changed by an Synkzone administrator after the user is created.
All three methods can be combined, but it's recommended to decide on one method to use.
The user creation methods are not a one-time choice. You can start with one configuration and change it later as your needs grow, for example by starting with manual creation, adding the external IdP sign-in, and later enabling SCIM provisioning. Each method can be enabled or disabled by the operator without having to recreate your users.
Enabling or disabling a method affects how new users are created. Existing users and their accounts are not removed or changed.
Generic OIDC
Prerequisites
- An OIDC client registered at the identity provider.
- The client ID and client secret for that registration.
- The following redirect URLs registered at the identity provider:
<Organization's Synkzone Web URL>/authhttps://synkzone.com/auth
Configuration
- Point the Organization Server at the identity provider. In
main/config/server.config, setIDPType=GenericOIDCandIDPIssuerURLto the provider's issuer URL. This value must exactly match the one specified by the identity provider. See server.config for the full property list. - Set the client ID. Set
IDPClientIdto the registered client ID. - Add the client secret. Add the client secret to a file and point
OAuthClientSecret.pathat it. - (Optional) Override the defaults. Set
IDPName(defaults to the hostname fromIDPIssuerURL) andIDPUserIdClaim(defaults tosub) if the defaults do not fit. - (Optional) Enable auto-provisioning. Set
AutoCreateIDPUsers=trueto automatically create Synkzone accounts for users signing in via the IdP for the first time. In most cases, provisioning via SCIM is a better alternative. - Restart the
maincomponent for the configuration to take effect.
Note
If the identity provider exposes a .well-known/openid-configuration endpoint at IDPIssuerURL, most of the remaining OIDC configuration is discovered automatically. Without it, the IdP may still work using standard defaults.
Example configuration
IDPType=GenericOIDC
IDPIssuerURL=https://login.example.com
IDPClientId=ex4mpl3-client-id
IDPName=My IDP
IDPUserIdClaim=sub
OAuthClientSecret.path=/config/oauth-client-secret
AutoCreateIDPUsers=false
ExAmPlEcLiEnTsEcReT1234567890abcdefgh
Scopes and claims
Synkzone uses a small part of what the IdP provides during sign-in. This section describes what is required and what is ignored, so you can configure the IdP with the least amount of access needed.
Scopes
Scopes define what information the IdP includes in the sign-in response.
Required scope: openid. Must be requested for sign-in to work.
Recommended scope: email. Creation of user and sign in will work without it, but Synkzone uses the email address to provide credentials. If this scope is not included the user may not be able to access their account.
Other scopes: All other listed scopes in the discovery document are requested but not used by Synkzone. They have no effect on sign-in, user attributes, or permissions.
The discovery document is found at the IdP’s issuer URL followed by /.well-known/openid-configuration, and must be reachable from Synkzone.
Claims
Claims are the pieces of information about the user that the IdP sends in the token.
Synkzone reads one claim to identify the user: the User ID claim (IDPUserIdClaim). Its value is used to find the user’s account through externalUserName.
Any claim can be used, standard (such as sub, email, or preferred_username) or custom, as long as it is included in the token. The value must be unique and permanent for each user, since it links the IdP identity to one active account. No other claims are used. Claims such as name, email, roles, or groups in the token are not read, and cannot be used to set user attributes or permissions.
Swedish BankID
Prerequisites
- A GrandID account and API key.
- A BankID key from GrandID.
Configuration
- Configure the GrandID connection. In
main/config/server.config, setGrandIdAPIto the GrandID API endpoint, andPersonalIdentificationTypes(for exampleSWEDISH_MOBILE_BANK_ID). See server.config for the full property list. - Add the GrandID API key. Add the key to a file and point
GrandIdAPIKey.pathat it. - Add the BankID key. Add the key to a file and point
GrandIdBankIdKey.pathat it. - Restart the
maincomponent for the configuration to take effect.
Example configuration
GrandIdAPI=https://client.grandid.com/json1.1
GrandIdAPIKey.path=/config/grandid-api-key
GrandIdBankIdKey.path=/config/grandid-bankid-key
PersonalIdentificationTypes=SWEDISH_MOBILE_BANK_ID
ExAmPlEgRaNdIdApIkEy1234567890
ExAmPlEgRaNdIdBaNkIdKeY1234567890