-
Notifications
You must be signed in to change notification settings - Fork 112
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
Service Accounts #3926
Service Accounts #3926
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Interesting! Which is the context of this? |
a626000
to
4d7512a
Compare
@gmgigi96 sorry, I completely missed your comment. Shame on me 😞 We want to have so called Reason for this is that we do not have an active user in some parts of the code, but need to get spaces/filemetadata/users/groups/.... |
5a08459
to
ff46118
Compare
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
b53cb69
to
64f0747
Compare
Signed-off-by: jkoberg <jkoberg@owncloud.com>
64f0747
to
ae3b406
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks fine to me. Just a new nits and questions.
662ac1d
to
f2feb7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's good now for a start.
Temporarilly converted to draft so it doesn't get merged before #4133 (that one is urgent for the web team) |
} | ||
|
||
func (a *inmemAuthenticator) Authenticate(userID string, secret string) error { | ||
if a.m[userID] == secret { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, just noticed that this will happily validate an any userid with an empty password (apart from the ones set in the ServiceUsers slice) . So it's possible to get a token using
authRes, err := gatewayClient.Authenticate(ctx, &gateway.AuthenticateRequest{
Type: "serviceaccounts",
ClientId: "what-ever-id-you-want",
ClientSecret: "",
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Missed that. Fixed now 👍
Signed-off-by: jkoberg <jkoberg@owncloud.com>
f2feb7a
to
c2f5d68
Compare
Introduces service-account auth manager
ATTENTION: BREAKS OCIS TEMPORARILY
check owncloud/ocis#6427 before merging