Skip to content

Use accessControl.enabled as switch to toggle GitLab Pages access control

Balasankar 'Balu' C requested to merge make-access-control-a-map into master

What does this MR do?

When we eventually do #2443 (closed), we will have to automatically create secrets. For this to happen, we will have to specify secret names, keys etc. For our shared-secrets generator to work, these all should be available under global. So, it might be best to do them under the accessControl key. What I have in mind for when we eventually do #2443 (closed) is something like

global:
  pages:
    enabled: false
    accessControl:
      enabled: false
      gitlabAuth: {} # Secret to store GitLab application ID and secret
        # secret: # Name of the secret
        # appIdKey: # Key where GitLab App ID is stored in the secret
        # appSecretKey: # Key where GitLab App secret is stored in the secret
        # redirectUri: # Callback URI. Defaults to `<protocol>://projects.<pages domain>/auth`
      authSecret: {}
        # secret:
        # key

However, there is one issue. We are changing type of an existing setting, and users who were using the old format (for setting up external Pages), will get an error failing to merge table with non-table.

Related issues

#2443 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Balasankar 'Balu' C

Merge request reports