-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #648 from NERC-CEH/NERCDL-867-sign-up-page
NERCDL-867 create sign-up page
- Loading branch information
Showing
21 changed files
with
369 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
In order for DataLabs to function there must be an OpenID connect (OIDC) compliant authentication provider (e.g Auth0, Keycloak, AWS Cognito) which will either | ||
store user information directly or serve to re-direct users to a different | ||
authentication provider which in turn will allow a user to recieve an identity | ||
authentication provider which in turn will allow a user to receive an identity | ||
token. | ||
|
||
All providers are different and offer various advantages. There are multiple | ||
|
@@ -138,9 +138,30 @@ used; | |
| OIDC_PROVIDER_AUDIENCE | This will be a value which is custom to the DataLabs deployment and will be used as the audience parameter on internal tokens that the authentication service generates | https://datalabs.domain/api | | ||
|
||
|
||
Not all providers offer a `${OIDC_PROVIDER_DOMAIN}/.well-known/openid-configuration` endpoint. If the provider you are using does not, two additional paramters must be specified for the necessary configuration information. | ||
Not all providers offer a `${OIDC_PROVIDER_DOMAIN}/.well-known/openid-configuration` endpoint. If the provider you are using does not, two additional parameters must be specified for the necessary configuration information. | ||
|
||
| Name | Description | Example (and default) | | ||
|---------------------------|------------------------------------------------------------|------------------------| | ||
| OIDC_OAUTH_TOKEN_ENDPOINT | Endpoint from the BASE URL where oauth tokens can be found | /oauth/token | | ||
| OIDC_JWKS_ENDPOINT | Endpoint from the BASE URL where JWKs can be found | /.well-known/jwks.json | | ||
|
||
### Self-service sign-up | ||
Depending on your identity provider, self-service sign-up may or may not be possible. | ||
The appropriate corresponding behaviour is configured in the [configmap](https://github.com/NERC-CEH/datalab-k8s-manifests/blob/master/templates/datalab/oidc-configmap.template.yml). | ||
|
||
**Self-service is available** | ||
```yaml | ||
"signUp": { | ||
"selfService": true | ||
} | ||
``` | ||
In this case, the 'Sign Up' button of DataLabs will redirect to the identity provider's sign-in page. | ||
|
||
**Self-service is not available** | ||
```yaml | ||
"signUp": { | ||
"selfService": false, | ||
"requestEmail": "[email protected]" | ||
} | ||
``` | ||
In this case, the 'Sign Up' button of DataLabs will redirect to a page asking the user to request an account by emailing the `requestEmail` address. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
{ | ||
"client_id": "Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"redirect_uri": "https://testlab.datalabs.localhost/callback", | ||
"response_type": "code", | ||
"scope": "openid profile", | ||
"authority": "https://mjbr.eu.auth0.com", | ||
"automaticSilentRenew": true, | ||
"accessTokenExpiringNotificationTime": "600", | ||
"filterProtocolClaims": true, | ||
"loadUserInfo": true, | ||
"extraQueryParams": { | ||
"audience": "https://datalab.datalabs.nerc.ac.uk/api" | ||
"oidc": { | ||
"userManager": { | ||
"client_id": "Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"redirect_uri": "https://testlab.datalabs.localhost/callback", | ||
"response_type": "code", | ||
"scope": "openid profile", | ||
"authority": "https://mjbr.eu.auth0.com", | ||
"automaticSilentRenew": true, | ||
"accessTokenExpiringNotificationTime": "600", | ||
"filterProtocolClaims": true, | ||
"loadUserInfo": true, | ||
"extraQueryParams": { | ||
"audience": "https://datalab.datalabs.nerc.ac.uk/api" | ||
}, | ||
"metadata": { | ||
"issuer": "https://mjbr.eu.auth0.com/", | ||
"authorization_endpoint": "https://mjbr.eu.auth0.com/authorize", | ||
"userinfo_endpoint": "https://mjbr.eu.auth0.com/userinfo", | ||
"end_session_endpoint": "https://mjbr.eu.auth0.com/v2/logout?returnTo=https://testlab.datalabs.localhost/&client_id=Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"jwks_uri": "https://mjbr.eu.auth0.com/.well-known/jwks.json", | ||
"token_endpoint": "https://mjbr.eu.auth0.com/oauth/token" | ||
} | ||
} | ||
}, | ||
"metadata": { | ||
"issuer": "https://mjbr.eu.auth0.com/", | ||
"authorization_endpoint": "https://mjbr.eu.auth0.com/authorize", | ||
"userinfo_endpoint": "https://mjbr.eu.auth0.com/userinfo", | ||
"end_session_endpoint": "https://mjbr.eu.auth0.com/v2/logout?returnTo=https://testlab.datalabs.localhost/&client_id=Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"jwks_uri": "https://mjbr.eu.auth0.com/.well-known/jwks.json", | ||
"token_endpoint": "https://mjbr.eu.auth0.com/oauth/token" | ||
"signUp": { | ||
"selfService": true, | ||
"requestEmail": "[email protected]" | ||
} | ||
} |
40 changes: 24 additions & 16 deletions
40
code/development-env/config/local/web_auth_config_keycloak.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
{ | ||
"client_id": "datalabs", | ||
"redirect_uri": "https://testlab.datalabs.localhost/callback", | ||
"response_type": "code", | ||
"scope": "openid profile email", | ||
"authority": "http://keycloak:8080/auth/realms/DataLabs", | ||
"automaticSilentRenew": true, | ||
"accessTokenExpiringNotificationTime": "600", | ||
"filterProtocolClaims": true, | ||
"loadUserInfo": true, | ||
"metadata": { | ||
"issuer": "http://keycloak:8080/auth/realms/DataLabs", | ||
"authorization_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/auth", | ||
"userinfo_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/userinfo", | ||
"end_session_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/logout?redirect_uri=http://testlab.datalabs.localhost", | ||
"jwks_uri": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/certs", | ||
"token_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/token" | ||
"oidc": { | ||
"userManager": { | ||
"client_id": "datalabs", | ||
"redirect_uri": "https://testlab.datalabs.localhost/callback", | ||
"response_type": "code", | ||
"scope": "openid profile email", | ||
"authority": "http://keycloak:8080/auth/realms/DataLabs", | ||
"automaticSilentRenew": true, | ||
"accessTokenExpiringNotificationTime": "600", | ||
"filterProtocolClaims": true, | ||
"loadUserInfo": true, | ||
"metadata": { | ||
"issuer": "http://keycloak:8080/auth/realms/DataLabs", | ||
"authorization_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/auth", | ||
"userinfo_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/userinfo", | ||
"end_session_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/logout?redirect_uri=http://testlab.datalabs.localhost", | ||
"jwks_uri": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/certs", | ||
"token_endpoint": "http://keycloak:8080/auth/realms/DataLabs/protocol/openid-connect/token" | ||
} | ||
} | ||
}, | ||
"signUp": { | ||
"selfService": true, | ||
"requestEmail": "[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,4 +130,4 @@ Array [ | |
"userId": "uid2", | ||
}, | ||
] | ||
`; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
{ | ||
"client_id": "Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"redirect_uri": "https://testlab.datalabs.localhost/callback", | ||
"response_type": "code", | ||
"scope": "openid profile", | ||
"authority": "https://mjbr.eu.auth0.com", | ||
"automaticSilentRenew": true, | ||
"filterProtocolClaims": true, | ||
"loadUserInfo": true, | ||
"extraQueryParams": { | ||
"audience": "https://datalab.datalabs.nerc.ac.uk/api" | ||
"oidc": { | ||
"userManager": { | ||
"client_id": "Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"redirect_uri": "https://testlab.datalabs.localhost/callback", | ||
"response_type": "code", | ||
"scope": "openid profile", | ||
"authority": "https://mjbr.eu.auth0.com", | ||
"automaticSilentRenew": true, | ||
"filterProtocolClaims": true, | ||
"loadUserInfo": true, | ||
"extraQueryParams": { | ||
"audience": "https://datalab.datalabs.nerc.ac.uk/api" | ||
}, | ||
"metadata": { | ||
"issuer": "https://mjbr.eu.auth0.com/", | ||
"authorization_endpoint": "https://mjbr.eu.auth0.com/authorize", | ||
"userinfo_endpoint": "https://mjbr.eu.auth0.com/userinfo", | ||
"end_session_endpoint": "https://mjbr.eu.auth0.com/v2/logout?returnTo=https://testlab.datalabs.localhost/&client_id=Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"jwks_uri": "https://mjbr.eu.auth0.com/.well-known/jwks.json", | ||
"token_endpoint": "https://mjbr.eu.auth0.com/oauth/token" | ||
} | ||
} | ||
}, | ||
"metadata": { | ||
"issuer": "https://mjbr.eu.auth0.com/", | ||
"authorization_endpoint": "https://mjbr.eu.auth0.com/authorize", | ||
"userinfo_endpoint": "https://mjbr.eu.auth0.com/userinfo", | ||
"end_session_endpoint": "https://mjbr.eu.auth0.com/v2/logout?returnTo=https://testlab.datalabs.localhost/&client_id=Xf62MEzjqxfaId1DVWnFul61D9oA3eMt", | ||
"jwks_uri": "https://mjbr.eu.auth0.com/.well-known/jwks.json", | ||
"token_endpoint": "https://mjbr.eu.auth0.com/oauth/token" | ||
"signUp": { | ||
"selfService": true, | ||
"requestEmail": "[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
code/workspaces/web-app/src/auth/auth0UniversalLoginScreens.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.