Skip to content

Commit

Permalink
Use cryptomator client id in staging keycloak as well (#10). Use vaul…
Browse files Browse the repository at this point in the history
…t instead of vault user attribute (#10).
  • Loading branch information
chenkins committed Aug 4, 2023
1 parent 8278614 commit ed43913
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void keycloakGrantAccessToVault(final SyncerConfig syncerConfig, f
if(attributes == null){
attributes = new HashMap<>();
}
attributes.put("vaults", Stream.concat(attributes.getOrDefault("vaults", Collections.EMPTY_LIST).stream(), Stream.of(vaultId)).toList());
attributes.put("vault", Stream.concat(attributes.getOrDefault("vault", Collections.EMPTY_LIST).stream(), Stream.of(vaultId)).toList());
ur.setAttributes(attributes);
userResource.update(ur);
}
Expand Down
2 changes: 0 additions & 2 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ quarkus.http.access-log.enabled=true
quarkus.oidc.application-type=service
quarkus.oidc.client-id=cryptomatorhub
hub.keycloak.oidc.cryptomator-client-id=cryptomator
# TODO https://github.com/chenkins/cipherduck-hub/issues/4 should we rather use hub.keycloak.oidc.cryptomator-client-id or add a new one for cipherduck if?
%cipherduck-staging.quarkus.oidc.client-id=cipherduckclient



Expand Down
21 changes: 2 additions & 19 deletions backend/src/main/resources/dev-realm.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,6 @@
"realmRoles": [
"syncer"
]
},
{
"username": "user001",
"email": "user001@localhost",
"enabled": true,
"attributes": {
"picture": "https://cryptomator.org/img/logo.svg"
},
"credentials": [
{
"type": "password",
"value": "1234"
}
],
"realmRoles": [
"user"
]
}
],
"scopeMappings": [
Expand Down Expand Up @@ -166,7 +149,7 @@
"aggregate.attrs": "true",
"userinfo.token.claim": "false",
"multivalued": "true",
"user.attribute": "vaults",
"user.attribute": "vault",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "aud"
Expand Down Expand Up @@ -231,7 +214,7 @@
"aggregate.attrs": "true",
"userinfo.token.claim": "false",
"multivalued": "true",
"user.attribute": "vaults",
"user.attribute": "vault",
"id.token.claim": "true",
"access.token.claim": "true",
"claim.name": "aud"
Expand Down

0 comments on commit ed43913

Please sign in to comment.