Skip to content

Proposal: Personal Access Tokens (PAT)#1

Open
rossigee wants to merge 2 commits into
container-registry:mainfrom
rossigee:proposal/personal-access-tokens-next
Open

Proposal: Personal Access Tokens (PAT)#1
rossigee wants to merge 2 commits into
container-registry:mainfrom
rossigee:proposal/personal-access-tokens-next

Conversation

@rossigee

@rossigee rossigee commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Proposes Personal Access Tokens (PAT) as a modern, self-service authentication mechanism for Harbor. PATs provide named, time-limited credentials with audit trails, enabling secure CI/CD integration and programmatic access.

Features

  • Self-service token management: Users create, list, update, and delete their own tokens
  • Time-limited credentials: Configurable expiration (days or never-expire)
  • Audit trail: Track token creation, updates, and usage via last_used_at
  • Scoped permissions: Project-level scope enforcement
  • Secure hashing: PBKDF2-SHA256 with per-token salt
  • Backward compatible: Automatic migration of legacy OIDC CLI secrets

Related Work


Summary by cubic

Adds a proposal for Personal Access Tokens (PAT) that enable self-service, time-limited, auditable credentials for Harbor’s API and Docker login via Basic Auth. Defines the hbr_pat_ token format, deny-by-default project scoping, versioned PBKDF2-SHA256 hashing (v1:sha256:100000:salt:hash) with configurable iterations, a personal_access_token table (with update_time trigger and secret VARCHAR(255)), clarified audit logging vs last_used_at, and legacy OIDC CLI secret migration on first use.

Written for commit 2f90e0d. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rossigee, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 17 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbd53db4-f21b-4a62-ae55-2a43bac80d1c

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed942a and 2f90e0d.

📒 Files selected for processing (1)
  • proposals/personal-access-tokens.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

Gitar is working

Gitar

Ports goharbor#287 for the harbor-next implementation
(container-registry/harbor-next#495).

Signed-off-by: Ross Golder <ross@golder.org>
@rossigee
rossigee force-pushed the proposal/personal-access-tokens-next branch from a8ef03a to 82e8e08 Compare July 21, 2026 06:57

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread proposals/personal-access-tokens.md
Comment thread proposals/personal-access-tokens.md Outdated
Comment thread proposals/personal-access-tokens.md
Comment thread proposals/personal-access-tokens.md
Comment thread proposals/personal-access-tokens.md Outdated
Comment thread proposals/personal-access-tokens.md Outdated
- Add versioned hash format v1:sha256:100000:salt:hash with configurable iterations
- Clarify audit trail vs last_used_at tracking
- Reduce secret VARCHAR from 7168 to 255
- Add PostgreSQL trigger for update_time auto-update
- Add deny-by-default scope validation semantics
- Fix legacy OIDC migration: on first use instead of startup

Signed-off-by: Ross Golder <ross@golder.org>
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.

1 participant