Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout de tests cypress #1112

Merged
merged 19 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 205 additions & 27 deletions realm-export.json → ...ycloak/config/realm-export.localhost.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "master",
"realm": "master",
"id": "elefan",
"realm": "elefan",
"displayName": "Keycloak",
"displayNameHtml": "<div class=\"kc-logo-text\"><span>Keycloak</span></div>",
"notBefore": 0,
Expand Down Expand Up @@ -646,17 +646,17 @@
"secret": "secret",
"description": "membres.yourcoop.local",
"rootUrl": "",
"adminUrl": "http://membres.yourcoop.local:8000/",
"baseUrl": "http://membres.yourcoop.local:8000/",
"adminUrl": "http://localhost:8000/",
"baseUrl": "http://localhost:8000/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://membres.yourcoop.local:8000/*"
"http://localhost:8000/*"
],
"webOrigins": [
"http://membres.yourcoop.local:8000/"
"http://localhost:8000/"
],
"notBefore": 0,
"bearerOnly": false,
Expand All @@ -678,7 +678,7 @@
"use.refresh.tokens": "true",
"oidc.ciba.grant.enabled": "false",
"backchannel.logout.session.required": "true",
"backchannel.logout.url": "http://membres.yourcoop.local:8000/logout",
"backchannel.logout.url": "http://localhost:8000/logout",
"client_credentials.use_refresh_token": "false",
"require.pushed.authorization.requests": "false",
"saml.client.signature": "false",
Expand All @@ -693,23 +693,23 @@
"tls.client.certificate.bound.access.tokens": "false",
"saml.authnstatement": "false",
"display.on.consent.screen": "true",
"saml.onetimeuse.condition": "false",
"saml.onetimeuse.condition": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"protocolMappers": [
{
"name": "adresse.ville",
"name": "address_city",
"protocol": "openid-connect",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "adresse.ville",
"user.attribute": "address.city",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "adresse.ville",
"claim.name": "address_city",
"jsonType.label": "String"
}
},
Expand Down Expand Up @@ -757,16 +757,16 @@
}
},
{
"name": "adresse.adresse",
"name": "address_street1",
"protocol": "openid-connect",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "adresse.adresse",
"user.attribute": "address.street1",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "adresse.adresse",
"claim.name": "address_street1",
"jsonType.label": "String"
}
},
Expand All @@ -777,7 +777,7 @@
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "conjoint",
"user.attribute": "co_member_number",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "co_member_number",
Expand All @@ -799,16 +799,16 @@
}
},
{
"name": "adresse.complement",
"name": "address_street2",
"protocol": "openid-connect",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "adresse.complement",
"user.attribute": "address.street2",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "adresse.complement",
"claim.name": "address_street2",
"jsonType.label": "String"
}
},
Expand All @@ -832,24 +832,24 @@
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "telephone",
"user.attribute": "phone",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "phone",
"jsonType.label": "String"
}
},
{
"name": "adresse.code_postal",
"name": "address_zipcode",
"protocol": "openid-connect",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "adresse.code_postal",
"user.attribute": "address.zipcode",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "adresse.code_postal",
"claim.name": "address_zipcode",
"jsonType.label": "String"
}
},
Expand All @@ -860,7 +860,7 @@
"consentRequired": false,
"config": {
"userinfo.token.claim": "true",
"user.attribute": "id",
"user.attribute": "member_number",
"id.token.claim": "false",
"access.token.claim": "false",
"claim.name": "member_number",
Expand Down Expand Up @@ -2349,13 +2349,73 @@
"policies": []
},
"users": [
{
"username": "newfromkeycloak",
"enabled": true,
"emailVerified": true,
"firstName": "Jimmy (new keycloak)",
"lastName": "flake",
"email": "[email protected]",
"credentials": [
{
"type": "password",
"hashedSaltedValue": "xjNR06W/ur5nBS8KFTrDgE81vLjb/t4A5LG2ubs/rII=",
"salt": "dyyLTNS/D+Ukspy5xgIa4w==",
"hashIterations": 27500,
"algorithm": "pbkdf2-sha256"
}
],
"attributes": {
"member_number": ["11111"],
"phone": ["0612345651"],
"flying": [true],
"address.street1": ["123 Main St"],
"address.street2": ["Apt 4"],
"address.zipcode": ["12345"],
"address.city": ["Anytown"],
"co_member_number": ["11111"]
},
"groups": [
"/coopérateur"
]
},
{
"username": "admin1",
"enabled": true,
"emailVerified": true,
"firstName": "Samuel (admin)",
"lastName": "Smith",
"email": "[email protected]",
"credentials": [
{
"type": "password",
"hashedSaltedValue": "xjNR06W/ur5nBS8KFTrDgE81vLjb/t4A5LG2ubs/rII=",
"salt": "dyyLTNS/D+Ukspy5xgIa4w==",
"hashIterations": 27500,
"algorithm": "pbkdf2-sha256"
}
],
"attributes": {
"member_number": ["11111"],
"phone": ["0612345651"],
"flying": [true],
"address.street1": ["123 Main St"],
"address.street2": ["Apt 4"],
"address.zipcode": ["12345"],
"address.city": ["Anytown"]
},
"groups": [
"/coopérateur",
"/infrastructure/informatique/elefan/admin"
]
},
{
"username": "admin2",
"enabled": true,
"emailVerified": true,
"firstName": "Sebastian (admin)",
"lastName": "Johnson",
"email": "admin2@example.com",
"email": "admin2@email.com",
"credentials": [
{
"type": "password",
Expand All @@ -2365,9 +2425,126 @@
"algorithm": "pbkdf2-sha256"
}
],
"clientRoles": {
"elefan": ["admin"]
"attributes": {
"member_number": ["11112"],
"phone": ["0612345652"],
"flying": [true],
"address.street1": ["123 Main St"],
"address.street2": ["Apt 4"],
"address.zipcode": ["12345"],
"address.city": ["Anytown"]
},
"groups": [
"/coopérateur",
"/infrastructure/informatique/elefan/admin"
]
},
{
"username": "admin3",
"enabled": true,
"emailVerified": true,
"firstName": "David (admin)",
"lastName": "Williams",
"email": "[email protected]",
"credentials": [
{
"type": "password",
"hashedSaltedValue": "xjNR06W/ur5nBS8KFTrDgE81vLjb/t4A5LG2ubs/rII=",
"salt": "dyyLTNS/D+Ukspy5xgIa4w==",
"hashIterations": 27500,
"algorithm": "pbkdf2-sha256"
}
],
"attributes": {
"member_number": ["12345"],
"phone": ["0612345653"],
"flying": [true],
"address.street1": ["123 Main St"],
"address.street2": ["Apt 4"],
"address.zipcode": ["11113"],
"address.city": ["Anytown"]
},
"groups": [
"/coopérateur",
"/infrastructure/informatique/elefan/admin"
]
},
{
"username": "admin4",
"enabled": true,
"emailVerified": true,
"firstName": "Carter (admin)",
"lastName": "Brown",
"email": "[email protected]",
"credentials": [
{
"type": "password",
"hashedSaltedValue": "xjNR06W/ur5nBS8KFTrDgE81vLjb/t4A5LG2ubs/rII=",
"salt": "dyyLTNS/D+Ukspy5xgIa4w==",
"hashIterations": 27500,
"algorithm": "pbkdf2-sha256"
}
],
"attributes": {
"member_number": ["12345"],
"phone": ["0612345654"],
"flying": [true],
"address.street1": ["123 Main St"],
"address.street2": ["Apt 4"],
"address.zipcode": ["11114"],
"address.city": ["Anytown"]
},
"groups": [
"/coopérateur",
"/infrastructure/informatique/elefan/admin"
]
},
{
"username": "admin5",
"enabled": true,
"emailVerified": true,
"firstName": "Wyatt (admin)",
"lastName": "Jones",
"email": "[email protected]",
"credentials": [
{
"type": "password",
"hashedSaltedValue": "xjNR06W/ur5nBS8KFTrDgE81vLjb/t4A5LG2ubs/rII=",
"salt": "dyyLTNS/D+Ukspy5xgIa4w==",
"hashIterations": 27500,
"algorithm": "pbkdf2-sha256"
}
],
"attributes": {
"member_number": ["11115"],
"phone": ["0612345655"],
"flying": [true],
"address.street1": ["123 Main St"],
"address.street2": ["Apt 4"],
"address.zipcode": ["12345"],
"address.city": ["Anytown"]
},
"groups": [
"/coopérateur",
"/infrastructure/informatique/elefan/admin"
]
},
{
"username": "admin",
"enabled": true,
"emailVerified": true,
"firstName": "Jayden (super admin)",
"lastName": "Garcia",
"email": "[email protected]",
"credentials": [
{
"type": "password",
"hashedSaltedValue": "xjNR06W/ur5nBS8KFTrDgE81vLjb/t4A5LG2ubs/rII=",
"salt": "dyyLTNS/D+Ukspy5xgIa4w==",
"hashIterations": 27500,
"algorithm": "pbkdf2-sha256"
}
],
"attributes": {
"member_number": ["12345"],
"phone": ["0685428468"],
Expand All @@ -2380,9 +2557,10 @@
},
"groups": [
"/coopérateur",
"/infrastructure/informatique/elefan/admin"
"/infrastructure/informatique/elefan/super_admin"
]
}

],
"groups": [
{
Expand Down
6 changes: 3 additions & 3 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ LOGGING_MATTERMOST_CHANNEL=elefan

# Open ID Client
OIDC_ENABLE=false
OIDC_PROFILE_CUSTOM_MESSAGE='vos informations personnelles sont éditables <a href="http://localhost:8081/"> ici </a>'
OIDC_NO_ACCOUNT_MESSAGE='Vous n\'avez pas de compte. Veuillez contacter l\'administrateur.'
OIDC_ISSUER=http://host.docker.internal:8081/auth
OIDC_PROFILE_CUSTOM_MESSAGE='vos informations personnelles sont éditables <a href="http://membres.yourcool.local:8080/"> ici </a>'
OIDC_NO_ACCOUNT_MESSAGE="Vous n\'avez pas de compte. Veuillez contacter le support."
OIDC_ISSUER=http://keycloak:8080/auth
OIDC_REALM=elefan
OIDC_CLIENT_ID=elefan
OIDC_CLIENT_SECRET=secret
Expand Down
Loading
Loading