| | | 1 | | using Elsa.ExternalAuthentication.Models; |
| | | 2 | | |
| | | 3 | | namespace Elsa.ExternalAuthentication.Permissions; |
| | | 4 | | |
| | | 5 | | /// <summary>Stable permission names and optional Studio descriptor metadata for External Authentication administration. |
| | | 6 | | public static class ExternalAuthenticationPermissions |
| | | 7 | | { |
| | | 8 | | public const string ConnectionsRead = "external-authentication:connections:read"; |
| | | 9 | | public const string ConnectionsCreate = "external-authentication:connections:create"; |
| | | 10 | | public const string ConnectionsUpdate = "external-authentication:connections:update"; |
| | | 11 | | public const string ConnectionsArchive = "external-authentication:connections:archive"; |
| | | 12 | | public const string ConnectionsTest = "external-authentication:connections:test"; |
| | | 13 | | public const string ConnectionsPreview = "external-authentication:connections:preview"; |
| | | 14 | | public const string PoliciesManage = "external-authentication:policies:manage"; |
| | | 15 | | public const string RolesAssign = "external-authentication:roles:assign"; |
| | | 16 | | public const string ProviderTrustUnsafe = "external-authentication:provider-trust:unsafe"; |
| | | 17 | | public const string PermissionsDelegate = "external-authentication:permissions:delegate"; |
| | | 18 | | public const string PermissionsDelegateUnrestricted = "external-authentication:permissions:delegate-unrestricted"; |
| | | 19 | | public const string LinksManage = "external-authentication:links:manage"; |
| | | 20 | | public const string SessionsRead = "external-authentication:sessions:read"; |
| | | 21 | | public const string SessionsRevoke = "external-authentication:sessions:revoke"; |
| | | 22 | | |
| | 2 | 23 | | public static IReadOnlyCollection<PermissionDescriptor> Descriptors { get; } = |
| | 1 | 24 | | [ |
| | 1 | 25 | | new(ConnectionsRead, "View identity provider connections", "View connection configuration and safe operational s |
| | 1 | 26 | | new(ConnectionsCreate, "Create identity provider connections", "Create database-owned identity provider connecti |
| | 1 | 27 | | new(ConnectionsUpdate, "Update identity provider connections", "Update settings and Secret Bindings, and enable |
| | 1 | 28 | | new(ConnectionsArchive, "Archive identity provider connections", "Archive and restore database-owned identity pr |
| | 1 | 29 | | new(ConnectionsTest, "Test identity provider connections", "Run on-demand provider connection tests.", "External |
| | 1 | 30 | | new(ConnectionsPreview, "Preview identity provider sign-in", "Run a redacted, non-mutating sign-in preview.", "E |
| | 1 | 31 | | new(PoliciesManage, "Manage external authentication policies", "Configure unlinked identity policies and permiss |
| | 1 | 32 | | new(RolesAssign, "Assign external authentication default roles", "Assign or remove Elsa Roles used when an exter |
| | 1 | 33 | | new(ProviderTrustUnsafe, "Use privileged authentication overrides", "Confirm unsafe provider trust settings or a |
| | 1 | 34 | | new(PermissionsDelegate, "Delegate external permissions", "Configure mappings for permissions the actor may dele |
| | 1 | 35 | | new(PermissionsDelegateUnrestricted, "Delegate unrestricted external permissions", "Configure permission mapping |
| | 1 | 36 | | new(LinksManage, "Manage external identity links", "Search tenant users and prelink or unlink external identitie |
| | 1 | 37 | | new(SessionsRead, "View external authentication sessions", "View safe external authentication session metadata." |
| | 1 | 38 | | new(SessionsRevoke, "Revoke external authentication sessions", "Revoke an external authentication session and it |
| | 1 | 39 | | ]; |
| | | 40 | | } |