[UX] Fine-grained PATs
Background
Personal Access Tokens (PATs) in GitLab is currently grant overly broad permissions, preventing organizations from following the Principle of Least Privilege (PoLP). To address this:
- We will enable users to create and manage PATs with granular permissions and resource-specific scope (targeting only the required repositories, projects, or resources).
Organizations with existing broad-access PATs will need a smooth path to transition to these new, appropriately scoped tokens without disrupting their workflows.
Problem overview
Current state of PATs, problem areas and success metrics from &18177 -
-
Overly Broad Permissions: PATs currently operate with coarse-grained scopes like
read_api
orapi
that grant extensive access across GitLab's entire feature set, violating the principle of least privilege. - Large Blast Radius: When a PAT is compromised, attackers gain access to all resources the user can access across all groups and projects they're a member of, potentially exposing sensitive data and operations across an entire organization.
- Limited Resource Specificity: Users cannot create tokens that are restricted to specific projects, groups, or resource types, forcing them to choose between functionality and security.
- Namespace-Wide Access: PATs automatically inherit access to all groups and projects the user belongs to, with no mechanism to restrict token access to only necessary resources.
Success metrics
- Adoption: 50% of new PATs use fine-grained permissions model within 6 months of GA
- Developer Experience: 85% satisfaction score in post-launch feedback
UX evaluation
- View journey mapping here
User definition
- System administrators: decides on policies that shape the system, balances security with developer productivity, respond and react to security incidents
- Solo developers: working on personal or small projects, limited collaboration
- Open source contributor: contributes to multiple projects across multiple organizations
- Freelance developer: works with multiple clients and often granted with temporary access
- DevOps or Platform Engineer: manages pipelines, scales infrastructure for teams and will use service accounts to automate workflows
- Enterprise User: assumes stricter more regulated industry with strict token use policy
Core jobs
- As a user, I want to create a Personal Access Token (PATs) with the least permissions I need to do my job in a given resource. What user wants to accomplish with PATs:
- Authenticate programmatically: access API, authenticate pipelines
- Maintain Git access: I need to clone/push to repositories while 2FA is enabled
- Integrate external/third part tools: I need Jira/Jenkins/tool to access our GitLab projects
- As a user, I want to create a PAT for specific service accounts to manage automated workflows, with the least permission it needs for its workflow.
- As an admin, I want to define and enforce my company's policies for PAT use.
User journey stages for PATs
- Need/recognition
- Set governance
- Create PATs
- Use PATs
- Maintain PATs
- Continuous governance controls
Design and Exploration
Exploration
Below is a summary of the low fidelity exploration completed for this work to help with refining requirements, leveraged Claude for quick prototyping (Figjam board). Feedback collected from AuthZ team, SSCS PDM and @pmartinsgl
.
Flow | Exploration | Team feedback & decisions |
---|---|---|
Admin sets access token settings on instance or top level group |
|
Decisions:
|
User creates a token |
|
Feedback:
Questions & Decisions:
|
We finalized 3 permission models to test:
Model | Iterface | Details |
---|---|---|
Permission set |
Figma Prototype (accessible only to GitLab team members)
|
|
Fully granular permissions (Have it your way) |
Figma Prototype (accessible only to GitLab team members)
|
|
Multiple scopes |
Figma Prototype (accessible only to GitLab team members) User can add multiple scopes, using the following:
|
🕵🏻 Solution Validation
We tested the 3 permission models with 13 internal and external customers:
- Security (30% of users interviewed): Prioritize granular control, willing to accept complexity
- General developers (46% of users interviewed): Prioritize workflow efficiency, risk with abandoning complex tools
- Internal customer facing team members (10% of users interviewed): Dual customer/internal perspective, recognize customer's need with granular control
Which resulted in the following insights:
- All users recognized strong value with granular permissions for Personal Access Tokens, with security personas particularly looking forward to added flexibility and meeting compliance use case.
- Users rated permission sets highly for ease of use and confidence, while fine-grained permissions were valued more for their precise control capabilities.
- User preferences split predictably by experience level: permission sets scored higher for ease of use among general users, while security professionals preferred fine-grained controls for compliance needs.
- Templates, AI guidance, and search functionality are essential for bridging the complexity gap and ensuring successful adoption across different user segments with varying expertise levels.
Additional learnings:
- Users struggled with the naming variations in fine-grained permission list
- Users have a test and iterate workflow for permissions, indicating the need for easy token modification or preview capabilities. The inability to edit tokens after creation is a risk and will force users toward over permissioning as a safety net.
- Users want to learn within the application rather than referencing external help. Information modals directly correlate with user confidence and should be considered essential, not optional UI elements.
The team made a decision: Move forward with fine-grained permission model, design solution for easing complexity (via templates or some other solution in GA).
🖌️ User flow and designs
Please note that the SSOT for designs are in the
Flow and designs | Details |
---|---|
View fine-grained personal access token in User > Personal Access Token |
Specifications/Hand off details: Nav changes
Add ability to generate fine-grained token
Table updates
User view token detail in drawer
Fine grained token drawer detail:
Legacy token drawer:
|
Generate fine-grained personal access token |
When user clicks “Generate fine-grained token”
Generate fine-grained PAT form
--> Under groups and project tab content
Form validation
Validation at submission
Loading and success states
Success state
Mobile Responsive Behavior
Email notification system
|
Manage fine-grained personal access token
|
Token revocation
Revocation confirmation states
Token list updates after revocation
Email notification system
Error handling for failed revocation
|
Manage fine-grained personal access token:
|
Token rotation modal
Rotation confirmation states
Token list updates after rotate
Error handling for failed rotation
|
Manage fine-grained personal access token:
|
Token duplication modal
Generate fine-grained token form (pre-populated)
Define scope section
Form validation and generation
Success state and confirmation
Original token preservation
Error handling
|
Admin can view access and permissions under scope in credential inventory |
Self Managed --> Credential Manager
For SaaS --> Credential Manager
|
Next steps
- Admin enforcement, needs team decision Discussion: Clarify enforcement of granular PAT... (#566490)
- Work on templates: #572290+ u=in %18.7
- Improve the legacy token creation form for consistency and to warn users of full api scope selection: Move broad access PATs form to new page and imp... (#576129)
Resources
- Granular PATs - Main project SSOT
- https://gitlab.com/gitlab-org/ux-research/-/issues/3590
- Discussion guide
UX project plan
Note: This work is interlocked for FY26Q4
-
Finalize scope (MR for beta/ga breakdown: https://gitlab.com/gitlab-com/content-sites/internal-handbook/-/merge_requests/7366) -
Define user, use cases, journey -
Map out user flows -
Generate low-fidelity mocks for team feedback: Jul 25, 2025
-
Align on validation areas: Aug 1, 2025
-
Permission sets and advanced mode -
Adoption risk and migration risk
-
-
High fidelity mocks and usertesting plan Aug 15, 2025
-
Validation from Aug 29, 2025
toSep 19, 2025
-
Share validation summary Sep 22, 2025
with product decision onSep 23, 2025
-
Handoff by %18.5