Skip to content
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

[patch] - Add options to custom-archive-credentials secret #1585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

caemar
Copy link
Contributor

@caemar caemar commented Dec 6, 2024

Downloading customization.zip file from Azure DevOps Git repository using a personal access token is possible.

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path={path}

But wget requires additional options in secret "{{ mas_workspace_id }}-{{ mas_app_id }}-cl0--cac--sn"

user={organization}
password={personal access token}
auth_no_challenge=on
secure-protocol=TLSv1_3

Otherwise wget fails with the following error.

wget $configfile https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path=/Cust.zip -O customization.zip
--2024-12-06 12:42:04--  https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path=/Cust.zip
Resolving dev.azure.com (dev.azure.com)... 13.107.42.20, 2620:1ec:21::20
Connecting to dev.azure.com (dev.azure.com)|13.107.42.20|:443... connected.
GnuTLS: The request is invalid.
Unable to establish SSL connection.

Adding secure-protocol=TLSv1_3 resolves GnuTLS error, but without auth_no_challenge=on the request is redirected to login page.

wget $configfile https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path=/Cust.zip -O customization.zip
--2024-12-06 12:45:34--  https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path=/Cust.zip
Resolving dev.azure.com (dev.azure.com)... 13.107.42.20, 2620:1ec:21::20
Connecting to dev.azure.com (dev.azure.com)|13.107.42.20|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://spsprodweu4.vssps.visualstudio.com/_signin?realm=dev.azure.com&reply_to=...

With this PR the following environment variables, if they are defined, will add the options secure-protocol=TLSv1_3 and auth_no_challenge=on to wget.

MAS_APP_SETTINGS_CUSTOMIZATION_ARCHIVE_AUTH_NO_CHALLANGE="on"
MAS_APP_SETTINGS_CUSTOMIZATION_ARCHIVE_SECURE_PROTOCOL="TLSv1_3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant