-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UID2-2340 Allow override for enforce_https
#329
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
a07d787
to
6a2dcd9
Compare
516994f
to
1130715
Compare
3c0e5f1
to
a0076b1
Compare
3a3a046
to
005e3ae
Compare
ba5187c
to
f825200
Compare
scripts/azure-cc/Dockerfile
Outdated
@@ -27,7 +27,6 @@ RUN tar xzvf /app/static.tar.gz --no-same-owner --no-same-permissions && rm -f / | |||
COPY ./entrypoint.sh /app/ | |||
RUN chmod a+x /app/entrypoint.sh | |||
|
|||
RUN adduser -D uid2-operator && mkdir -p /opt/uid2 && chmod 777 -R /opt/uid2 && mkdir -p /app && chmod 705 -R /app && mkdir -p /app/file-uploads && chmod 777 -R /app/file-uploads | |||
USER uid2-operator | |||
RUN mkdir -p /opt/uid2 && chmod 777 -R /opt/uid2 && mkdir -p /app && chmod 705 -R /app && mkdir -p /app/file-uploads && chmod 777 -R /app/file-uploads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this change because with the uid2-operator user it doesn’t have 777 access to the /tmp folder. Remove User to be consistent with gcp-oidc: https://github.com/IABTechLab/uid2-operator/blob/main/scripts/gcp-oidc/Dockerfile#L32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on.. I remember we remove user in GCP for some specific reason: not be able to read token.
If possible let's keep the uid2-operator user.
Can we update jq_inplace_update_json function to put tmp file in same folder with final_config where we should have write permission? ( See comment below )
scripts/azure-cc/entrypoint.sh
Outdated
local file=$1 | ||
local field=$2 | ||
local value=$3 | ||
jq --argjson v "$value" ".$field = \$v" "$file" > tmp.json && mv tmp.json "$file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it work if we define a local tmp = "$file.tmp"
, and replace tmp.json
with it?
enforce_https
enforce_https
a1f77ea
to
54eb837
Compare
local file=$1 | ||
local field=$2 | ||
local value=$3 | ||
jq --argjson v "$value" ".$field = \$v" "$file" > $TMP_FINAL_CONFIG && mv $TMP_FINAL_CONFIG "$file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to move the TMP_FINAL_CONFIG path inside this function.
Please review in order of:
enforce_https
#329I’ve tested it working: