#1640 Provide for passing credentials to SRPMfromSCM
Merged by tkopecek. Opened by electronghost.
electronghost/koji credentials_bind_mount_for_srpm_generation  into  master

Download 1640.patch

Some places force every access to their systems to be authenticated for
audit purposes, which means even an https fetch of a source tarball
needs access to some sort of credential.

Provide for a directory intended to contain credentials to be
bind-mounted into the BuildRoot for the BuildSRPMFromSCM task as
"/credentials". Whatever runs a a result of the source_cmd ("make
sources") is responsible for doing something useful with the contents.

rebased onto 4b1246cdd9e1fab229a1edf86c1fe7070f93d17f

Created tracking issue: #1658

I'm worried about exposing credentials in such way (It can be even downloaded via save-failed-tree task by anyone - with proper config it should work anyway). On the other hand, I've no better idea now, so if there is some other +1, I'm ok with merging it.

@mikem @breilly @julian8628

There are a variety of ways that credentials could be exfiltrated even if you don't allow save-failed-tree. However, the alternative is to provide credential-free access to anything "make sources" is allowed to see, which won't fly.

I considered more elaborate means of handling this, but it essentially boils down to the same thing; "make sources" has access to the credentials.

(Unless and until we can have SELinux inside the mock environment, at which point combining that with enforcing gpg signatures when installing packages to generate the mock environment with appropriate policies would allow the credentials to be accessed only by known "safe" utilities, but save-failed-tree probably doesn't work so well any more then)

Ultimately the purpose of these credentials is to satisfy an auditing requirement, and I'm expecting them to be changed regularly by an automated process.

Ok, :thumbsup:

rebased onto 5c7a3b816217dd2fff2d49cf388e5a642080917c

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

Better to be None

Can we have some warning in docs to indicate the potential risks?

It is also possible to expose the credentials by some aforethought make_source_cmd

fixes: #1658

rebased onto 6bf476b34edbad6d7be526d61d83bb4463d88942

rebased onto 7edd560df6651b30ef4abe508cd64d408b631519

Commit 160780ce fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

Metadata