sameersbn / sameersbn/docker-gitlab

Need `authorize_params` in oauth2_generic

Open
#2,662 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

Currently I am in need for authorize_params key in oauth2_generic provider, as seen in this example from https://docs.gitlab.com/ee/integration/oauth2_generic.html#configure-the-oauth-20-provider

gitlab_rails['omniauth_providers'] = [
  {
    name: "oauth2_generic",
    label: "Provider name", # optional label for login button, defaults to "Oauth2 Generic"
    app_id: "<your_app_client_id>",
    app_secret: "<your_app_client_secret>",
    args: {
      client_options: {
        site: "<your_auth_server_url>",
        user_info_url: "/oauth2/v1/userinfo",
        authorize_url: "/oauth2/v1/authorize",
        token_url: "/oauth2/v1/token"
      },
      user_response_structure: {
        root_path: [],
        id_path: ["sub"],
        attributes: {
          email: "email",
          name: "name"
        }
      },
      authorize_params: { --------------> this
        scope: "openid profile email"
      },
      strategy_class: "OmniAuth::Strategies::OAuth2Generic"
    }
  }
]
  1. I have tried to inject it using "sed inplace in specific line number" before /sbin/entrypoint.sh but I can't seems to find the key for oauth2_generic in gitlab.yaml inside container.

  2. And currently I am trying to build the image from source, but it took so long 😅 .

  3. I also tried to volume mount the gitlab.yml with

     volumes:
     - ./.dockerdata/gitlab:/home/git/data:Z
     - $PWD/gitlab.yml:/home/git/gitlab/config/gitlab.yml

but got this sed: cannot rename /home/git/gitlab/config/sedgfJOQv: Device or resource busy

Any suggestion ?

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 with /sbin/entrypoint.sh and inspect how the oauth2_generic provider is generated in gitlab.yml or /home/git/gitlab/config/gitlab.yml. Reproduce the configuration path and the volume-mount error before tracing where provider arguments are assembled. Done means authorize_params can be configured without editing the container manually or triggering the reported rename error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.