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

Provide authentication for images accessed via network within platform's driver_config #343

Open
dbeezt opened this issue Jul 24, 2019 · 1 comment

Comments

@dbeezt
Copy link

dbeezt commented Jul 24, 2019

I should preface this by mentioning that I'm quite new to Kitchen and Kitchen-Docker (and Configuration Management as a whole!), so apologies if I've missed something obvious.

When configuring the test environment, the image(s) to be provisioned can have their origin specified via URL. However, if the image is located behind a level of authentication (e.g. proxy network), to my knowledge there is no method of supplying authentication information to bypass whatever layer of security there may be and retrieve the image from beyond.

I noticed that there are username and password variables in the source code (.kitchen.yml) as shown below...

        driver:
          name: docker

        platforms:
          - name: dockerfile
            driver: 
                 username: dockerfile
                 password: dockerfile

...but these seem to be unrelated to any sort of image attainment, and even then their nature doesn't appear to be secure enough (hard-coded in source albeit probably storable in environment) to fit the use case.

I was wondering whether such a method of providing authentication existed within this plugin, or if not, whether it could develop into something related to what I've pseudo'd below?

        driver:
          name: docker

        platforms:
          - name: example
            driver_config:
               platform: os
               image: path_to_image
                 image_auth: admin:password
@dbeezt
Copy link
Author

dbeezt commented Jul 25, 2019

Figured out a solution to this issue, albeit its likely specific to my use case: I was able to 'docker login' to the internal registry prior to retrieving the image, and credentials were passed in through a network-available environment variable.

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