[RFD - 0003] - Service Accounts #69
AleksandarCole
started this conversation in
RFD
Replies: 1 comment 1 reply
-
It's interesting that you exclude the
Definitely would like to see auto-rotation in the future. With static credentials, the user has to do the rotation implementation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[RFD - 0003] - Service Accounts
@radwo
@lucaspin
@DamjanBecirovic
In queue
What
Semaphore Service Accounts are special accounts made for automated processes and bots. They let organizations create new Semaphore accounts and give them specific permissions for certain tasks, making it easier and safer to manage access to resources compared to giving permissions directly to individual users or groups. Service Accounts do not have access to the UI, ensuring they are used solely for automation purposes.
With service accounts, managing permissions becomes simpler. Each service account can be set up with only the permissions needed, ensuring automated processes have just the right access. This reduces the risk of unauthorized actions and improves overall security.
Why
Implementing Semaphore Service Accounts enhances security and manageability within the organization. By assigning permissions to service accounts instead of directly to users or groups, we can achieve the following:
By leveraging service accounts, organizations can streamline their access control mechanisms while maintaining robust security and compliance practices.
Use-cases
Case 1 - Pipeline triggers across multiple projects
In this scenario, an organization uses Semaphore Service Accounts to automate pipeline triggers across multiple projects. They achieve this by making an API call in
Project 1
to start pipelines inProject 2
andProject 3
automatically. Instead of using user API tokens, they prefer to useService Account 2
andService Account 3
. These service accounts are set up with specific permissions to start pipelines in each respective project.By using service accounts, the organization ensures that their automation process is secure and well-managed. It allows them to automate workflows smoothly without needing to expose personal user credentials, keeping everything safe and running efficiently across their projects.
Case 2 - Read only access on all projects in organization
In this scenario, an organization manages multiple Semaphore projects where no single user has access to all of them. To periodically gather information on completed pipelines for their internal dashboard tool, they use a service account approach.
They create a dedicated service account with read-only permissions for workflows and assign it to all projects. This service account allows them to run API calls without needing to grant any user full access to all projects or rely on individual user tokens. This setup ensures they can centrally monitor pipeline activities across their projects securely and efficiently for their internal reporting needs.
Feature Description
Access Control
Access to the Service Accounts feature
organization roles
through the Custom Roles feature.Owner
role in Semaphore.Assigning access to the Service Account
Service Accounts do not have access to the
ui
. They can interact with Semaphore only throughAPI calls
orcli commands
.Project access is controlled by adding the account to the project and assigning appropriate project roles to the Service Account.
For example, if a service account should be able to trigger workflows on
project 1
but only view (get description of) workflows onproject 2
, then the account should be added toproject 1
with theContributor
role and toproject 2
with theReader
role.⚠ Important: Unlike User Accounts, Service accounts cannot be connected to GitHub or BitBucket.
Managing Service Account
When creating a new Service Account user provides:
Once the Account is created, user receives a generated API token for the account.
This token works similar to current personal API tokens - it can be refreshed as needed.
Auth. token functionality can be extended further in future iterations:
UI Changes
UI changes are still to be defined. Service Accounts can either live:
Organization Settings
People
page.Service Accounts in People Page
People & Accounts
Pros:
Cons:
Current State and How to contribute
⚠ This feature is still in the R&D phase
This means that the functionality scope, UI patterns, and implementation details are still to be decided.
If you are interested in this feature help us shape it further by:
Beta Was this translation helpful? Give feedback.
All reactions