Skip to content

Conversation

@willdurand
Copy link
Member

Fixes mozilla/addons#15944


While this creates a service account automatically (with JWT/AMO API
keys), configuring the groups/permissions remains a manual process
because every service is going to be different.

@willdurand willdurand force-pushed the service-account branch 2 times, most recently from 5a546a6 to a2da4eb Compare January 14, 2026 15:39
@willdurand willdurand marked this pull request as ready for review January 14, 2026 15:42
@@ -256,6 +257,21 @@ class ScannerWebhook(ModelBase):
class Meta:
db_table = 'scanners_webhooks'

def save(self, *args, **kwargs):
UserProfile.objects.get_or_create_service_account(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also automatically delete it if the ScannerWebhook gets deleted ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I didn't link scanner webhooks with UserProfile precisely to not have to delete the accounts when the ScannerWebhook is deleted but I am wondering if this is good. Though, my approach to this would be to keep things simple for now, and iterate.

@willdurand
Copy link
Member Author

Updated!

@willdurand willdurand merged commit 5bcbd03 into master Jan 20, 2026
46 checks passed
@willdurand willdurand deleted the service-account branch January 20, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Create service accounts for the scanner pipeline

3 participants