git-ecosystem / git-ecosystem/git-credential-manager

The Gitlab provider does not support the parameter oauthScopes

Open
#1,792 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
9.3k
Forks
2.9k
Avg merge
7d 1h
Merged PRs (30d)
14

Description

Feature description

The token scopes for the Gitlab provider are hard-coded in the source code: read_repository & write_repository.
I would like to use the token, created by GCM, also for Maven dependency resolution via the package registry API (in a Gradle Kotlin Script).
This is only possible if you request a token with the scopes "api" or "read_api".
Unfortunately the gitlab provider does not allow to override the scopes with the credential.oauthScopes property, defined by GCM.

The Scope parameter is read by GCM (TryGet "oauthScopes"), but not used when requesting the token. Therefore the token can only be used to perform Git operations.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the GitLab provider's token request and the code that reads the credential.oauthScopes property. Confirm how the hard-coded read_repository and write_repository scopes are passed to the request; done means a configured oauthScopes value controls the requested scopes, including api or read_api.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.