-
Notifications
You must be signed in to change notification settings - Fork 50
feat: service account kms #634
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
Merged
+4,097
−524
Merged
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
52a877f
feat: enhance ServiceAccountToken model with creator validation and r…
nimish-ks e9d91ba
fix: update ServiceAccountTokenSerializer to use ServiceAccountToken …
nimish-ks d060d09
feat: add created_by_service_account field to ServiceAccountToken model
nimish-ks 9c2ae45
feat: implement ServiceAccountUser class for service account handling
nimish-ks 828cf77
feat: add createdByServiceAccount field to ServiceAccountTokenType
nimish-ks c42700f
feat: add EnableServiceAccountSseMutation and related types
nimish-ks 5a45642
feat: add EnableServiceAccountSSE mutation and update GetServiceAccou…
nimish-ks c031aa9
feat: rename EnableServiceAccountThirdPartyAuthMutation and add clien…
nimish-ks 3d51fa9
feat: update service account mutations for key management
nimish-ks 5ce3ca8
feat: enhance service account mutations for key management
nimish-ks 41001dd
feat: update service account mutations and queries for key management
nimish-ks 9a5772f
feat: enhance service account mutations and queries for key management
nimish-ks 234b985
feat: add service account secret wrapping and unwrapping functions
nimish-ks d9528d5
feat: implement KeyManagementDialog for service account key management
nimish-ks 7018c3b
feat: enhance ServiceAccountTokens component to display creator infor…
nimish-ks 498f4c2
feat: add createdByServiceAccount field to GetServiceAccountTokens query
nimish-ks a0a57ab
feat: rename third_party_auth_enabled to server_side_key_management_e…
nimish-ks 5e80b3f
feat: update ServiceAccountType and related queries for key management
nimish-ks b299c77
feat: add serverSideKeyManagementEnabled field to GetServiceAccountDe…
nimish-ks 86f6fba
feat: add mutations for enabling client-side and server-side key mana…
nimish-ks 64bdc55
fix: update KeyManagementDialog to use serverSideKeyManagementEnabled
nimish-ks c9dae07
feat: enhance ServiceAccount page with key management display
nimish-ks b530252
refactor: streamline KeyManagementDialog save logic and remove unnece…
nimish-ks aeb4bac
refactor: remove unnecessary alert from KeyManagementDialog
nimish-ks b40b377
feat: add TTL utility functions for human-readable time formats
nimish-ks 7023dca
feat: add IdentityProviders class for managing authentication configu…
nimish-ks 7514944
feat: add Identity model for third-party identity configurations
nimish-ks 6b2de44
feat: add cryptographic utility functions for secret sharing and key …
nimish-ks 8f18ed5
feat: add function to list STS endpoints from botocore metadata
nimish-ks 3d810ef
feat: implement service account token management utilities
nimish-ks 120ec7f
feat: implement AWS IAM authentication endpoint for service accounts
nimish-ks f06add9
feat: add identity management mutations and queries
nimish-ks b9c9a20
feat: add AWS IAM authentication route to URL configuration
nimish-ks 5152e90
feat: add identity management mutations for create, update, and delet…
nimish-ks 6027a11
feat: enhance GraphQL schema with Identity and IdentityProvider types
nimish-ks 45761ad
feat: update UpdateServiceAccountMutation to include identity management
nimish-ks 9725fbb
feat: add Identities role to default roles configuration
nimish-ks 77d9316
feat: add resolver for identities in organisation
nimish-ks 4f7cd2b
feat: add resolvers for AWS STS endpoints and identity providers
nimish-ks 8e937a8
feat: implement identity management page for organisation
nimish-ks 4984b74
feat: enhance service account page with identity management features
nimish-ks 61d3b76
feat: implement ServiceAccountIdentities component for managing assoc…
nimish-ks bc0a69b
feat: add IdentityProviderSelector component for selecting identity p…
nimish-ks 5553582
feat: add ProviderCards component for displaying identity providers
nimish-ks aecfce0
feat: add AwsIamIdentityDialog component for AWS IAM identity management
nimish-ks 6d9c348
feat: add GraphQL mutations and queries for identity management
nimish-ks c34a3dd
feat: update AccessLayout component to include third-party identities…
nimish-ks 1e18deb
feat: enhance GraphQL schema with identity management features
nimish-ks 690591d
feat: expand GraphQL schema with identity management mutations and qu…
nimish-ks c975241
feat: add Identity model and service account identities relationship
nimish-ks a8ac59c
refactor: remove unused third-party authentication toggle from Create…
nimish-ks cb70d5b
fix: update terminology for identity management in ServiceAccountIden…
nimish-ks eb5a70e
fix: update label for identity management in AccessLayout component
nimish-ks 64c46f3
fix: update label for identity management in IdentityPage component
nimish-ks 19b06e5
feat: add unit tests for AWS IAM authentication
nimish-ks 1a5d3ca
feat: implement unit tests for AWS IAM authentication logic
nimish-ks cd1bc80
feat: add initial identity and AWS identity modules
nimish-ks 933972c
fix: init modules
nimish-ks 78685f4
refactor: rename identity mutation operations for consistency
nimish-ks cc660ad
refactor: update identity mutation operations to include "Ext" prefix
nimish-ks 6503774
fix: use configured STS endpoint instead of user supploed
nimish-ks 9d21dbc
feat: robust xml parsing from aws response
nimish-ks 108cd39
feat: updated titles and descriptions for server-side key management
nimish-ks 7f16837
chore: remove global legacy sts endpoint list insertion
nimish-ks 080b5ed
Merge branch 'main' into feat--service-account-kms
nimish-ks 5323368
Merge branch 'feat--service-account-kms' into feat--identities
nimish-ks fa5b430
refactor: external identity crud
rohan-chaturvedi a1ad2be
fix: misc updates to account identity management ux
rohan-chaturvedi 4ca417d
feat: misc updates to KMS management ux
rohan-chaturvedi 7870555
Merge branch 'main' into feat--service-account-kms
rohan-chaturvedi 527111a
Merge branch 'feat--service-account-kms' into feat--identities
rohan-chaturvedi df7c5b8
fix: clean up migration graph
rohan-chaturvedi 504662c
chore: regenrate schema and types
rohan-chaturvedi 0a674f6
chore: organize urls
rohan-chaturvedi 113afb7
chore: update url
rohan-chaturvedi bf4ecdc
fix: misc ui cleanup
rohan-chaturvedi d73c4ac
chore: misc cleanup
rohan-chaturvedi 4860e08
chore: rename permission class to ExternalIdentities
rohan-chaturvedi dff980b
chore: combine ttl utils into single file
rohan-chaturvedi 5be3b9a
Merge pull request #635 from phasehq/feat--identities
rohan-chaturvedi 5a0bd0d
fix: copy, layout
rohan-chaturvedi c751c8a
fix: make sure clean is run on model save, remove redundant imports
rohan-chaturvedi b0bfa62
chore: update version to v2.53.0
nimish-ks 1fe6860
chore: remove empty else block
rohan-chaturvedi 0c40b7b
fix: add timeout and error handling for AWS STS request
rohan-chaturvedi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
class IdentityProviders: | ||
""" | ||
Configuration for supported identity providers. | ||
Similar to Providers in services.py but specifically for identity authentication. | ||
""" | ||
|
||
AWS_IAM = { | ||
"id": "aws_iam", | ||
"name": "AWS IAM", | ||
"description": "Use AWS STS GetCallerIdentity to authenticate.", | ||
"icon_id": "aws", # Maps to ProviderIcon component | ||
"supported": True, | ||
} | ||
|
||
# Future identity providers can be added here: | ||
# GitHub OIDC | ||
# "id": "github_oidc", | ||
# "name": "GitHub OIDC", | ||
# "description": "Use GitHub OIDC for authentication.", | ||
# "icon_id": "github", | ||
# "supported": False, | ||
# } | ||
# | ||
# Kubernetes OIDC | ||
# "id": "kubernetes_oidc", | ||
# "name": "Kubernetes OIDC", | ||
# "description": "Use Kubernetes OIDC for authentication.", | ||
# "icon_id": "kubernetes", | ||
# "supported": False, | ||
# } | ||
|
||
@classmethod | ||
def get_all_providers(cls): | ||
"""Get all identity providers, including unsupported ones for future roadmap display.""" | ||
return [ | ||
provider | ||
for provider in cls.__dict__.values() | ||
if isinstance(provider, dict) | ||
] | ||
|
||
@classmethod | ||
def get_supported_providers(cls): | ||
"""Get only currently supported identity providers.""" | ||
return [ | ||
provider | ||
for provider in cls.__dict__.values() | ||
if isinstance(provider, dict) and provider.get("supported", False) | ||
] | ||
|
||
@classmethod | ||
def get_provider_config(cls, provider_id): | ||
"""Get configuration for a specific provider by ID.""" | ||
for provider in cls.__dict__.values(): | ||
if isinstance(provider, dict) and provider["id"] == provider_id: | ||
return provider | ||
raise ValueError(f"Identity provider '{provider_id}' not found") | ||
|
25 changes: 25 additions & 0 deletions
25
backend/api/migrations/0110_serviceaccounttoken_created_by_service_account.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 4.2.22 on 2025-08-22 08:59 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0109_alter_dynamicsecret_key_map"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="serviceaccounttoken", | ||
name="created_by_service_account", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
related_name="created_tokens", | ||
to="api.serviceaccount", | ||
), | ||
), | ||
] |
56 changes: 56 additions & 0 deletions
56
backend/api/migrations/0111_identity_serviceaccount_identities.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Generated by Django 4.2.22 on 2025-08-25 13:24 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("api", "0110_serviceaccounttoken_created_by_service_account"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Identity", | ||
fields=[ | ||
( | ||
"id", | ||
models.TextField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
), | ||
), | ||
("provider", models.CharField(max_length=64)), | ||
("name", models.CharField(max_length=100)), | ||
("description", models.TextField(blank=True, null=True)), | ||
("config", models.JSONField(default=dict)), | ||
( | ||
"token_name_pattern", | ||
models.CharField(blank=True, max_length=128, null=True), | ||
), | ||
("default_ttl_seconds", models.IntegerField(default=3600)), | ||
("max_ttl_seconds", models.IntegerField(default=86400)), | ||
("created_at", models.DateTimeField(auto_now_add=True, null=True)), | ||
("updated_at", models.DateTimeField(auto_now=True)), | ||
("deleted_at", models.DateTimeField(blank=True, null=True)), | ||
( | ||
"organisation", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="api.organisation", | ||
), | ||
), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name="serviceaccount", | ||
name="identities", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="service_accounts", to="api.identity" | ||
), | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.