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

How do you add a secret file for terminal control? #6

Open
johnbburg opened this issue Sep 21, 2022 · 5 comments
Open

How do you add a secret file for terminal control? #6

johnbburg opened this issue Sep 21, 2022 · 5 comments

Comments

@johnbburg
Copy link

I just tried creating one in the volume in varnish/ and just using "secret" as a value. But my application doesn't seem to get authorization this way.

@rfay
Copy link
Member

rfay commented Sep 21, 2022

Hi @johnbburg - Maybe you can give a litle more context, including a link to the relevant varnish doc, and say more about what you're trying to accomplish.

@johnbburg
Copy link
Author

Hi, thanks for the quick reply.

So from https://varnish-cache.org/docs/6.0/reference/varnishadm.html

-S secretfile
Specify the authentication secret file. This should be the same -S argument as was given to varnishd. Only processes which can read the contents of this file, will be able to authenticate the CLI connection.

Basically I'm testing the invalidation process in my app, and it requires that secret for authentication.

@johnbburg
Copy link
Author

I may have figured out, it should be

    command: '-T 0.0.0.0:6082 -S /etc/varnish/secret'

Though now I'm confused where I got this command line in docker-compose, since it wasn't there according to this repo...

@rfay
Copy link
Member

rfay commented Sep 23, 2022

It sounds like you have it working now, if so, you might consider a PR to add that info to the README, or consider closing this.

It also may be reasonable just to do a PR that adds that and adds a "secret" file, and puts the info in the README?

@bbu23
Copy link

bbu23 commented Mar 4, 2024

I've been struggling a bit with this, but the only way I managed was by creating a file named "secret" in .ddev/varnish folder, pasted the key on one line, gave the 0600 permissions and then ran ddev restart. That worked for me.

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

3 participants