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

Add authentication support to apt repositories #5116

Open
cparich opened this issue Oct 15, 2024 · 0 comments
Open

Add authentication support to apt repositories #5116

cparich opened this issue Oct 15, 2024 · 0 comments

Comments

@cparich
Copy link

cparich commented Oct 15, 2024

What needs to get done

Apt repositories support authentication via options in sources.list or files in /etc/apt/auth.conf and /etc/apt/auth.conf.d

Add an authentication mechanism for type: apt entries in package-repositories that takes an auth.conf.d formatted file

Why it needs to get done

Snapcraft doesn't restrict a workaround where you can put the authentication details into the URI like https://<user>:<pass>@example.com/repo however it does embed the secret into the build log, and some services like JFrog generate large keys which will lead to a "File name too long" error.

When embedding the secret into the URI, the build log might look something like this:

2024-10-15 09:27:46.009 :: 2024-10-15 09:27:41.189 Processing repo: PackageRepositoryApt(type='apt', priority=None, url='https://***:***@example.com/path', key_id='***', architectures=None, formats=None, path=None, components=['main'], key_server=None, suites=['jammy'], pocket=None, series=None)

Further, without an authentication file, developers have to resort to workarounds like sed 's/{{AUTH}}/$PASS/' snap/local/snapcraft.yaml.in > snap/snapcraft.yaml in order to maintain different authentication sets between local developers and build servers.

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

No branches or pull requests

1 participant