From b1542436f0560d3cae88983fe40eee385e4fc643 Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Tue, 1 Jun 2021 17:46:13 +0200 Subject: [PATCH] Update changelog --- changelog/unreleased/lw-user-types.md | 9 +++++++++ changelog/unreleased/user-type.md | 4 ---- internal/grpc/interceptors/auth/auth.go | 6 +----- 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 changelog/unreleased/lw-user-types.md delete mode 100644 changelog/unreleased/user-type.md diff --git a/changelog/unreleased/lw-user-types.md b/changelog/unreleased/lw-user-types.md new file mode 100644 index 00000000000..9921f95b789 --- /dev/null +++ b/changelog/unreleased/lw-user-types.md @@ -0,0 +1,9 @@ +Enhancement: Add support for lightweight user types + +This PR adds support for assigning and consuming user type when setting/reading +users. These changes are further required to enable setting varying access +scopes for different types of users, such as lightweight accounts which can only +access resources shared with them. + +https://github.com/cs3org/reva/pull/1744 +https://github.com/cs3org/cs3apis/pull/120 diff --git a/changelog/unreleased/user-type.md b/changelog/unreleased/user-type.md deleted file mode 100644 index 24edc9b75f3..00000000000 --- a/changelog/unreleased/user-type.md +++ /dev/null @@ -1,4 +0,0 @@ -Enhancement: Assign and consume user type when setting/reading users - -https://github.com/cs3org/reva/pull/1744 -https://github.com/cs3org/cs3apis/pull/120 diff --git a/internal/grpc/interceptors/auth/auth.go b/internal/grpc/interceptors/auth/auth.go index 4953e78238a..aa19b99c57e 100644 --- a/internal/grpc/interceptors/auth/auth.go +++ b/internal/grpc/interceptors/auth/auth.go @@ -107,8 +107,6 @@ func NewUnary(m map[string]interface{}, unprotected []string) (grpc.UnaryServerI return handler(ctx, req) } - log.Info().Msgf("GRPC unary interceptor %s, %+v", info.FullMethod, req) - span.AddAttributes(trace.BoolAttribute("auth_enabled", true)) tkn, ok := token.ContextGetToken(ctx) @@ -241,8 +239,6 @@ func dismantleToken(ctx context.Context, tkn string, req interface{}, mgr token. if ref.GetPath() != "" { // Try to extract the resource ID from the scope resource. - // Currently, we only check for public shares, but this will be extended - // for OCM shares, guest accounts, etc. log.Info().Msgf("resolving path reference to ID to check token scope %+v", ref.GetPath()) for k := range tokenScope { switch { @@ -293,7 +289,7 @@ func checkResourcePath(ctx context.Context, ref *provider.Reference, r *provider return false, err } - // Since the public share is obtained from the scope, the current token + // Since the resource ID is obtained from the scope, the current token // has access to it. statReq := &provider.StatRequest{ Ref: &provider.Reference{