Add optional service-account-backed dynamic tokens to avoid per-request bot users
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- gitlab, go
- Lĩnh vực
- api, authentication, authorization, backend
Hướng nghiên cứu
Start by reviewing the existing role lifecycle, project/group token issuance, lease revocation, and deletion behavior, then compare the constraints with related issue #117. Done means an explicit service-account mode supports idempotent provisioning, independent tokens, preserved scopes and TTLs, documented prerequisites and lifecycle behavior, and tests and documentation covering the acceptance criteria.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The plugin currently creates a GitLab project or group access token for every dynamic credential request. GitLab creates a new bot user for each of those tokens and retains the user for a configurable period after the token becomes inactive. Repeated credential requests therefore create identity churn and can clutter project or group membership.
Token rotation, as proposed in #117, does not fully solve this use case because rotating a token immediately revokes its predecessor. Concurrent jobs reading the same Vault role need independently revocable credentials that remain valid for their own leases.
Proposed feature
Add an opt-in role mode that uses a stable GitLab service account as the identity for dynamic credentials.
When a role is created or updated, the plugin should be able to:
- Create or locate a service account for the configured project or group.
- Persist the service account identifier with the role.
- Ensure that the service account has the configured project/group membership and access level.
When credentials are requested from that role, the plugin should create a new short-lived token for the existing service account rather than creating a new project/group access token and bot user.
The existing project/group access-token behavior should remain the default for backward compatibility.
An illustrative configuration could be:
token_type = "project-service-account"
service_account_name = "vault-{{ .role_name }}"
The exact option names and role schema are open for discussion.
Required behavior
- Service-account provisioning is idempotent. Reapplying or updating a role reuses the same account.
- Concurrent credential requests create independent tokens under the same service account.
- Issuing or revoking one leased token does not revoke tokens held by other jobs.
- Generated tokens preserve the configured scopes, TTL, and lease revocation behavior.
- The plugin handles create/update races without producing duplicate service accounts.
- Existing roles continue to use project/group access tokens unless the new mode is explicitly selected.
- Errors clearly identify missing GitLab version, license, or permission prerequisites.
- Role reads expose the managed service account identity without exposing secrets.
- Role deletion has documented service-account lifecycle behavior. Destructive cleanup should require an explicit option or separate operation.
Acceptance criteria
- Project-backed service-account tokens are supported on compatible GitLab versions.
- Group-backed service-account tokens are supported where the GitLab API permits them.
- Multiple simultaneous reads of one role return usable tokens associated with one service-account user.
- Revoking one Vault lease leaves other active leases usable.
- Reapplying the same role does not create another service account.
- Unit and acceptance tests cover provisioning, concurrent issuance, revocation, updates, and deletion behavior.
- Documentation covers permissions, GitLab-version requirements, migration, and rollback.
Design considerations
- Should the plugin create the service account itself, or optionally accept the username/ID of a pre-provisioned account?
- How should membership/access-level drift be reconciled?
- What should happen if the configured account name already exists but was not created by this plugin?
- Can this share a common
token_typemodel with user, project, and group service accounts?
Related
- #117 proposes rotating an existing project access token. Rotation is useful for other cases, but its immediate revocation semantics make it unsafe as the sole solution for parallel CI jobs.
- Ngôn ngữ chính
- Go
- Star
- 63
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của splunk/vault-plugin-secrets-gitlab
-
Templated policiesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
splunk/vault-plugin-secrets-gitlab#117 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
splunk/vault-plugin-secrets-gitlab#111 · 1 bình luận ·
-
support for group level access tokenCó thể đã có người làm @M0roSan đã nhận 1701 ngày trước. Đang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
splunk/vault-plugin-secrets-gitlab#36 · 6 bình luận · 1 reaction ·
-
documentation help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của splunk/vault-plugin-secrets-gitlab
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Applications at the repository root are not triggered by new commitsCó thể đã có người làm @Daksha1611 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
docker-compose: postgres healthcheck should probe TCP (pg_isready -h localhost)Có thể đã có người làm @zezo-mohamed22 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
OneBusAway/watchdog#305 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self-care self-care:agent-discoverability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
githubnext/gh-cao#20928 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày