Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
switch to preferred_username as opaqueid
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Mar 20, 2020
1 parent 65b701f commit e9c6d2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/new-ocis-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ We changed the default configuration to integrate better with ocis.
- We use a dedicated technical `reva` user to make ldap binds
- Clients are supposed to use the ocis-proxy endpoint `https://localhost:9200`
- We removed unneeded ocis configuration from the frontend which no longer serves an oidc provider.
- We changed the default user OpaqueID attribute from `sub` to `preferred_username`. Tha latter is a claim populated by konnectd that can also be used by the reva ldap user manager to look up users by their OpaqueId

https://github.com/owncloud/ocis-reva/pull/113
10 changes: 8 additions & 2 deletions pkg/flagset/authbearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,14 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
Destination: &cfg.Reva.OIDC.Insecure,
},
&cli.StringFlag{
Name: "oidc-id-claim",
Value: "sub", // sub is stable and defined as unique. the user manager needs to take care of the sub to user metadata lookup
Name: "oidc-id-claim",
// preferred_username is a workaround
// the user manager needs to take care of the sub to user metadata lookup, which ldap cannot do
// TODO sub is stable and defined as unique.
// AFAICT we want to use the account id from ocis-accounts
// TODO add an ocis middleware to reva that changes the users opaqueid?
// TODO add an ocis-accounts backed user manager
Value: "preferred_username",
Usage: "OIDC id claim",
EnvVars: []string{"REVA_OIDC_ID_CLAIM"},
Destination: &cfg.Reva.OIDC.IDClaim,
Expand Down

0 comments on commit e9c6d2d

Please sign in to comment.