-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add identity manager #1505
Conversation
d71909e
to
70870c8
Compare
70870c8
to
bc09810
Compare
) | ||
|
||
// identityManager provides a means to manage identities within JIMM. | ||
type identityManager struct { |
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.
i would suggest exporting the identityManager
type
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.
As discussed, I think we should definitely do this but in a separate piece of work.
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.
please create a jira ticket to at least discuss the issue if not to address it
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.
var users []openfga.User | ||
|
||
for _, id := range identities { | ||
users = append(users, *openfga.NewUser(&id, j.authSvc)) |
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.
openfga.NewUser
looks like another opportunity for a factory.. something like
userFactory := openfga.NewUserFactor(j.authSvc)
and then we could do something like
user := userFactory.New(id)
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.
Very true, good for a separate piece of work.
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.
lgtm
) | ||
|
||
// identityManager provides a means to manage identities within JIMM. | ||
type identityManager struct { |
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.
please create a jira ticket to at least discuss the issue if not to address it
Description
This PR introduces an identity manager. Note that the identity manager doesn't create identity (that is only done on login), rather the identity manager performs operations like Fetch, Count and List identities.
Fixes JUJU-7254
Engineering checklist