-
Notifications
You must be signed in to change notification settings - Fork 33
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
Bootstrap token #717
Bootstrap token #717
Conversation
ed0a6a1
to
aa5b87c
Compare
cb5419d
to
66aace4
Compare
ea1b8a2
to
dbe782a
Compare
dbe782a
to
3da9a49
Compare
for _, userResult := range allUserResults { | ||
if userResult.OrganizationName == "RecoveryRootOrg" { | ||
if userResult.SearchMatch == fmt.Sprintf(" | %s () ()", username) { | ||
fmt.Printf("Found user ID using multi-organization query.\n") | ||
return userResult.EntityId, nil | ||
} | ||
} | ||
} |
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.
Some day we should probably refactor this, so that we fetch subscription
as part of userResult
and so we can match on userResult.Subscription = "ClusterOwner"
instead of whatever the name of the cluster owner organization happens to be. I see this is just moving over whatever "user & token management" from the auth sidecar into the Reconciler, so its fine to stick with this right now, but ideally we'd tidy this up a bit.
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.
If single org. mode is active it seems like organization ID is SINGLE_ORGANIZATION_ID
with subscription
being Paying
.
So probably want to:
if single org mode:
find user in the organization with `orgID=SINGLE_ORGANIZATION_ID`
if multi org mode:
find user in the organization with `subscription=ClusterOwner`
(or maybe split in two, first look up orgID of org that is cluster owner, then specifically search that organization for the user)
5193f30
to
8e010b9
Compare
56bf7d1
to
9aaceac
Compare
9aaceac
to
4916d34
Compare
No description provided.