diff --git a/README.md b/README.md index f638bcc0..5f5770b2 100644 --- a/README.md +++ b/README.md @@ -86,13 +86,19 @@ These options specify the RBAC of the api-endpoint. | ADMIN_ROLE\_ | Specifies the required admin role | UNSPECIFIED | | | | | EDITOR | admin editor | | | | VIEWER | admin viewer | +| MACHINE_ROLE\_ | Specifies the required machine role | UNSPECIFIED | | +| | | EDITOR | machine editor | +| | | VIEWER | machine viewer | +| INFRA_ROLE\_ | Specifies the required infra role | UNSPECIFIED | | +| | | EDITOR | infra editor | +| | | VIEWER | infra viewer | | VISIBILITY\_ | Specifies the visibility of the api-endpoint | UNSPECIFIED | | | | | PUBLIC | api-method is visible to public, a token is not needed | | | | SELF | api-method is scoped to owner resources | > [!IMPORTANT] > -> Every operation needs at least an option, which references the scope of the request: **ROLE** or **VISIBILITY** +> Every operation needs to specify exactly one of the presented options. The option defines the request scope, which is later used for implementing request authorization in the server. > [!CAUTION] > diff --git a/doc/index.html b/doc/index.html index 6e7b44fc..42de6145 100644 --- a/doc/index.html +++ b/doc/index.html @@ -264,6 +264,18 @@
IsKey returns true if name field satisfies our requirements
IsMachineSubjectPermission returns true if name field satisfies our requirements
IsPrefix validates if the given string is a valid prefix
IsProjectSubjectPermission returns true if name field satisfies our requirements
IsTenantLogin returns true if name field satisfies our requirements
IsTenantSubjectPermission returns true if name field satisfies our requirements
AdminPermissions carries admin method permissions
+ + +| Field | Type | Label | Description |
| methods | +string | +repeated | +Methods which should be accessible |
+
InfraPermissions carries infra method permissions
+ + +| Field | Type | Label | Description |
| methods | +string | +repeated | +Methods which should be accessible |
+
MachinePermissions carries machine method permissions
+ + +| Field | Type | Label | Description |
| uuid | +string | ++ | UUID of this machine +asterisk (*) can be specified to match any subject |
+
| methods | +string | +repeated | +Methods which should be accessible |
+
MethodPermission is a mapping from a subject/project to a service method
@@ -4142,6 +4290,183 @@PermissionsByVisibility contains method permissions by visibility
+ + +| Field | Type | Label | Description |
| public | +PublicPermissions | ++ | PublicPermissions carries public method permissions |
+
| self | +SelfPermissions | ++ | SelfPermissions carries self method permissions |
+
| project | +ProjectPermissions | ++ | ProjectPermissions carries project method permissions |
+
| tenant | +TenantPermissions | ++ | TenantPermissions carries tenant method permissions |
+
| admin | +AdminPermissions | ++ | AdminPermissions carries admin method permissions |
+
| machine | +MachinePermissions | ++ | MachinePermissions carries machine method permissions |
+
| infra | +InfraPermissions | ++ | InfraPermissions carries infra method permissions |
+
ProjectPermissions carries project method permissions
+ + +| Field | Type | Label | Description |
| project | +string | ++ | asterisk (*) can be specified to match any subject |
+
| methods | +string | +repeated | +Methods which should be accessible |
+
PublicPermissions carries public method permissions
+ + +| Field | Type | Label | Description |
| methods | +string | +repeated | +Methods which should be accessible |
+
SelfPermissions carries self method permissions
+ + +| Field | Type | Label | Description |
| methods | +string | +repeated | +Methods which should be accessible |
+
TenantPermissions carries tenant method permissions
+ + +| Field | Type | Label | Description |
| login | +string | ++ | Login of the tenant +asterisk (*) can be specified to match any subject |
+
| methods | +string | +repeated | +Methods which should be accessible |
+
Token generates a jwt authentication token to access the api
There are two different types of tokens, api- and user- tokens
A user token is used to authenticate end user requests for example from a cli.
The configured roles in a user token are expanded in the api server
based on the memberships in other projects and tenants based on the role granted there.
User tokens will never contain permissions.
Permissions are always derived from the tenant and project roles and memberships.
The api token should be used to authenticate services.
In contrast to a user token, the api token permissions and roles apply as configured during the token create process.
Message level validation, can be developed using https://protovalidate.com/playground
@@ -4416,7 +4741,7 @@Permissions is a list of service methods this token can be used for
Permissions is a list of service methods this token can be used for