-
Notifications
You must be signed in to change notification settings - Fork 676
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
MG-2048 - Implement Personal Access Tokens (PATs) #2492
base: auth-refactor
Are you sure you want to change the base?
Conversation
c057ea7
to
3ad5253
Compare
2b465a8
to
7eee43e
Compare
@@ -109,3 +109,4 @@ func encodeAuthorizeRequest(_ context.Context, grpcReq interface{}) (interface{} | |||
Object: req.Object, | |||
}, 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.
Remove this line
auth/api/grpc/auth/requests.go
Outdated
|
||
type authPATReq struct { | ||
paToken string | ||
platformEntityType string | ||
optionalDomainID string | ||
optionalDomainEntityType string | ||
operation string | ||
entityIDs []string | ||
} | ||
|
||
func (req authPATReq) validate() error { | ||
if req.paToken == "" { | ||
return apiutil.ErrBearerToken | ||
} | ||
return 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.
This was not used anywhere
pkg/authn/authsvc/authn.go
Outdated
@@ -42,5 +42,5 @@ func (a authentication) Authenticate(ctx context.Context, token string) (authn.S | |||
if err != nil { | |||
return authn.Session{}, errors.Wrap(errors.ErrAuthentication, err) | |||
} | |||
return authn.Session{DomainUserID: res.GetId(), UserID: res.GetUserId(), DomainID: res.GetDomainId()}, nil | |||
return authn.Session{ID: res.GetId(), UserID: res.GetUserId(), DomainID: res.GetDomainId()}, 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.
Please revert to DomainUserID,This affect everywhere, since we are using DomainUserID in all places
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.
Since domain was removed from token this will be empty
3f43476
to
4323d34
Compare
4323d34
to
c04c035
Compare
c04c035
to
37e5c2c
Compare
33a88f8
to
c1faa58
Compare
- Set/Unset parent Group for Things and Channels (absmach#2486) - Move groups out of pkg (absmach#2493) - Separate Things authn and Channels authz (absmach#2496) Signed-off-by: Arvindh <[email protected]> NOISSUE - Add Publish/Subscribe to channels (absmach#2497) Signed-off-by: Arvindh <[email protected]> MG-2457 - Update auth tests (absmach#2503) Signed-off-by: Felix Gateru <[email protected]> MG-2477 - Replace Things with Clients (absmach#2508) Signed-off-by: Dusan Borovcanin <[email protected]> NOISSUE - Rename Things to Clients Signed-off-by: Felix Gateru <[email protected]> Signed-off-by: Arvindh <[email protected]>
Signed-off-by: Felix Gateru <[email protected]>
… user, clients, channels (absmach#2506) Signed-off-by: Arvindh <[email protected]>
Signed-off-by: Arvindh <[email protected]> Signed-off-by: Felix Gateru <[email protected]> Co-authored-by: Arvindh <[email protected]>
Signed-off-by: Arvindh <[email protected]>
Signed-off-by: Felix Gateru <[email protected]>
Signed-off-by: Felix Gateru <[email protected]>
Signed-off-by: Felix Gateru <[email protected]>
Signed-off-by: Felix Gateru <[email protected]> Signed-off-by: Arvindh <[email protected]> Co-authored-by: Arvindh <[email protected]>
dfb07d3
to
4abbbdf
Compare
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
Signed-off-by: nyagamunene <[email protected]>
4abbbdf
to
bdd542d
Compare
What type of PR is this?
This is a feature because it adds the following functionality: It add personal access token.
What does this do?
It adds personal access token.
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Yes
Did you document any new/modified feature?
No
Notes