From 84cc618e52f182a3a8805980929b477bdb31b8b0 Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Wed, 21 Apr 2021 14:17:26 +0200 Subject: [PATCH 1/3] Add user account type field to user ID --- cs3/identity/user/v1beta1/resources.proto | 21 ++++++++ docs/index.html | 65 +++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/cs3/identity/user/v1beta1/resources.proto b/cs3/identity/user/v1beta1/resources.proto index 1d1ddd3d..7b793630 100644 --- a/cs3/identity/user/v1beta1/resources.proto +++ b/cs3/identity/user/v1beta1/resources.proto @@ -39,6 +39,9 @@ message UserId { // the unique identifier for the user in the scope of // the identity provider. string opaque_id = 2; + // REQUIRED. + // The type of user account. + UserAccountType account_type = 3; } // Represents a user of the system. @@ -53,3 +56,21 @@ message User { int64 uid_number = 8; int64 gid_number = 9; } + +// The type of user account. +enum UserAccountType { + // The user account is invalid, for example, is missing primary attributes. + USER_ACCOUNT_TYPE_INVALID = 0; + // A primary user account. + USER_ACCOUNT_TYPE_PRIMARY = 1; + // A secondary account for users with multiple identities. + USER_ACCOUNT_TYPE_SECONDARY = 2; + // An account catering to specific services. + USER_ACCOUNT_TYPE_SERVICE = 3; + // An account to be used by specific applications. + USER_ACCOUNT_TYPE_APPLICATION = 4; + // Guest accounts which can be used by users not affiliated to the IDP. + USER_ACCOUNT_TYPE_GUEST = 5; + // Federated accounts provided by external IDPs. + USER_ACCOUNT_TYPE_FEDERATED = 6; +} diff --git a/docs/index.html b/docs/index.html index 7e87f54d..db6802f9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -639,6 +639,10 @@

Table of Contents

+
  • + EUserAccountType +
  • + @@ -5601,6 +5605,14 @@

    UserId

    the identity provider.

    + + account_type + UserAccountType + +

    REQUIRED. +The type of user account.

    + + @@ -5610,6 +5622,59 @@

    UserId

    +

    UserAccountType

    +

    The type of user account.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameNumberDescription
    USER_ACCOUNT_TYPE_INVALID0

    The user account is invalid, for example, is missing primary attributes.

    USER_ACCOUNT_TYPE_PRIMARY1

    A primary user account.

    USER_ACCOUNT_TYPE_SECONDARY2

    A secondary account for users with multiple identities.

    USER_ACCOUNT_TYPE_SERVICE3

    An account catering to specific services.

    USER_ACCOUNT_TYPE_APPLICATION4

    An account to be used by specific applications.

    USER_ACCOUNT_TYPE_GUEST5

    Guest accounts which can be used by users not affiliated to the IDP.

    USER_ACCOUNT_TYPE_FEDERATED6

    Federated accounts provided by external IDPs.

    + From 2bb46827c0cc4f10be3d8cc1ba2cbbb8ca504e3b Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Wed, 21 Apr 2021 15:21:05 +0200 Subject: [PATCH 2/3] Rename fields to remove mentions of 'account' --- cs3/identity/user/v1beta1/resources.proto | 36 ++++++++++---------- docs/index.html | 40 +++++++++++------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/cs3/identity/user/v1beta1/resources.proto b/cs3/identity/user/v1beta1/resources.proto index 7b793630..5b0ac3fd 100644 --- a/cs3/identity/user/v1beta1/resources.proto +++ b/cs3/identity/user/v1beta1/resources.proto @@ -40,8 +40,8 @@ message UserId { // the identity provider. string opaque_id = 2; // REQUIRED. - // The type of user account. - UserAccountType account_type = 3; + // The type of user. + UserType type = 3; } // Represents a user of the system. @@ -57,20 +57,20 @@ message User { int64 gid_number = 9; } -// The type of user account. -enum UserAccountType { - // The user account is invalid, for example, is missing primary attributes. - USER_ACCOUNT_TYPE_INVALID = 0; - // A primary user account. - USER_ACCOUNT_TYPE_PRIMARY = 1; - // A secondary account for users with multiple identities. - USER_ACCOUNT_TYPE_SECONDARY = 2; - // An account catering to specific services. - USER_ACCOUNT_TYPE_SERVICE = 3; - // An account to be used by specific applications. - USER_ACCOUNT_TYPE_APPLICATION = 4; - // Guest accounts which can be used by users not affiliated to the IDP. - USER_ACCOUNT_TYPE_GUEST = 5; - // Federated accounts provided by external IDPs. - USER_ACCOUNT_TYPE_FEDERATED = 6; +// The type of user. +enum UserType { + // The user is invalid, for example, is missing primary attributes. + USER_TYPE_INVALID = 0; + // A primary user. + USER_TYPE_PRIMARY = 1; + // A secondary user for cases with multiple identities. + USER_TYPE_SECONDARY = 2; + // A user catering to specific services. + USER_TYPE_SERVICE = 3; + // A user to be used by specific applications. + USER_TYPE_APPLICATION = 4; + // A guest user not affiliated to the IDP. + USER_TYPE_GUEST = 5; + // A federated user provided by external IDPs. + USER_TYPE_FEDERATED = 6; } diff --git a/docs/index.html b/docs/index.html index db6802f9..26ddd353 100644 --- a/docs/index.html +++ b/docs/index.html @@ -640,7 +640,7 @@

    Table of Contents

  • - EUserAccountType + EUserType
  • @@ -5606,11 +5606,11 @@

    UserId

    - account_type - UserAccountType + type + UserType

    REQUIRED. -The type of user account.

    +The type of user.

    @@ -5622,8 +5622,8 @@

    UserId

    -

    UserAccountType

    -

    The type of user account.

    +

    UserType

    +

    The type of user.

    @@ -5631,45 +5631,45 @@

    UserAccountType

    - + - + - + - + - + - + - + - + - + - + - + - + - + - + From 0aceee7aa9d1e8dda76be585471e10a525e34076 Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Mon, 26 Apr 2021 09:22:08 +0200 Subject: [PATCH 3/3] Add lightweight user type --- cs3/identity/user/v1beta1/resources.proto | 2 ++ docs/index.html | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/cs3/identity/user/v1beta1/resources.proto b/cs3/identity/user/v1beta1/resources.proto index 5b0ac3fd..2e12b916 100644 --- a/cs3/identity/user/v1beta1/resources.proto +++ b/cs3/identity/user/v1beta1/resources.proto @@ -73,4 +73,6 @@ enum UserType { USER_TYPE_GUEST = 5; // A federated user provided by external IDPs. USER_TYPE_FEDERATED = 6; + // A lightweight user account without access to various major functionalities. + USER_TYPE_LIGHTWEIGHT = 7; } diff --git a/docs/index.html b/docs/index.html index 26ddd353..329537f2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5672,6 +5672,12 @@

    UserType

    + + + + + +
    NameNumberDescription
    USER_ACCOUNT_TYPE_INVALIDUSER_TYPE_INVALID 0

    The user account is invalid, for example, is missing primary attributes.

    The user is invalid, for example, is missing primary attributes.

    USER_ACCOUNT_TYPE_PRIMARYUSER_TYPE_PRIMARY 1

    A primary user account.

    A primary user.

    USER_ACCOUNT_TYPE_SECONDARYUSER_TYPE_SECONDARY 2

    A secondary account for users with multiple identities.

    A secondary user for cases with multiple identities.

    USER_ACCOUNT_TYPE_SERVICEUSER_TYPE_SERVICE 3

    An account catering to specific services.

    A user catering to specific services.

    USER_ACCOUNT_TYPE_APPLICATIONUSER_TYPE_APPLICATION 4

    An account to be used by specific applications.

    A user to be used by specific applications.

    USER_ACCOUNT_TYPE_GUESTUSER_TYPE_GUEST 5

    Guest accounts which can be used by users not affiliated to the IDP.

    A guest user not affiliated to the IDP.

    USER_ACCOUNT_TYPE_FEDERATEDUSER_TYPE_FEDERATED 6

    Federated accounts provided by external IDPs.

    A federated user provided by external IDPs.

    A federated user provided by external IDPs.

    USER_TYPE_LIGHTWEIGHT7

    A lightweight user account without access to various major functionalities.