Gitlab-3 (AWS secret access)

  • Prerequisite
    - aws configure (login to AWS with right user)
    # Need to add in Secret Key & Secret Access Key
    - Need to create git-lab user to access in IAM
    # 1. create gitlab-user
    # 2. Add policy “secretsmanager:GetSecretValue”
    { “Version”: “2012–10–17”,
    “Statement”: [
    { “Sid”: “GitlabCiPolicy”,
    “Effect”: “Allow”,
    “Action”: [
    “secretsmanager:GetSecretValue” ],
    “Resource”: “*” } ]}
    # 3. Go to KMS and add gitlab-user to access (in json policy)
    → under Sid “Allow usage of key” add the ARN for the gitlab-user “arn:aws:iam::925878512292:user/gitlab-user”
  • Getting the secret value
    aws secretsmanager get-secret-value --secret-id development/MyTestDatabase
  • Getting individual secret value
    aws secretsmanager get-secret-value — secret-id Sonarqube-Secret | jq --raw-output ‘.SecretString’ | jq -r .”SONAR_LOGIN_TOKEN”
    (if you put --raw-output or -r, it will not have "" covering it )

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is new in Cypress v9.5.0 & v9.5.1?

There’s an error in your code, but that’s OK! (Part 1)

Build Container Images with Jenkins and Podman — Part 2

How to enter storage curve as depth vs volume in XPSWMM

Meaningful software: wishful thinking and rationality bias

How To Calculate The Approximate Price of Cloud Computing

LPIC-2 Study materials

Ansible: Configuring target node using variables based on OS family by dynamically loading…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
June Chung

June Chung

More from Medium

Beginning to Application Frameworks

Top 5 Big Data Tools

Task:- Store your data in AWS EFS and attach EFS with multiple EC2 instances

CS 371p Spring 2022: Blog #5