Skip to content

Support onboarding git projects with Access Token in Codebase-Operator (equivalent to SSH key flow, without affecting SSH key usage) #231

@zmotso

Description

@zmotso

Currently, KubeRocketCI Codebase-Operator provides onboarding and authentication for Git projects using only SSH keys. The integration guides and templates mention that users can generate access tokens for various git providers (GitHub, GitLab, Bitbucket) and store them as part of the Secret with the 'token' field. However, Codebase-Operator should fully support onboarding git projects using an API access token, with the same flow, user experience, and automation as SSH keys.
The following changes are required:

  • Add support in Codebase-Operator to use access tokens or app passwords for onboarding and interacting with git projects, in addition to the existing SSH key method.
  • User can select either SSH key or access token for onboarding; both mechanisms must be maintained and coexist, without affecting current SSH key functionality.
  • For API token authentication, reuse existing flows for Secret management (id_rsa, username, and token fields) to securely store credentials as described in KubeRocketCI documentation.
  • All UI, operator and automation workflows for onboarding, cloning, and codebase creation should work transparently with either method.
  • No changes or regressions allowed for SSH key logic and workflows.

Acceptance Criteria

  • Codebase-Operator supports user onboarding of git projects using access tokens/app passwords for GitHub, GitLab, and Bitbucket, in a way identical to SSH key onboarding.
  • User can choose between SSH key and access token during Git server integration (via UI and manifest).
  • Secret structure supports both id_rsa for SSH and token for access token; onboarding flow works if only access token is present.
  • All backend processing, hooks, and pipeline triggers are successfully handled with access token credentials, per supported git provider API.
  • No changes, regression, or break in onboarding using SSH key; previous SSH credential usage works as before.
  • Documentation (user guide and examples such as "Add Git Server" and "Integrate GitHub") are clear and updated to show API token and SSH key usage as equivalent options.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions