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

Generated secrets do not work well with sed #14

Open
laolux opened this issue Jan 23, 2021 · 5 comments
Open

Generated secrets do not work well with sed #14

laolux opened this issue Jan 23, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@laolux
Copy link
Contributor

laolux commented Jan 23, 2021

I followed your instructions and synapse generated a secret which would not work well with sed in the makefile.
Namely, I got a synapse_macaroon_secret_key like abc&def. Seems like sed does not like the & in there.
Unfortunately I do not know enough about sed to fix this.

Anyways, I could still run everything by simply generating new secrets which did not contain any &.
Thanks for the great project!

@travier
Copy link
Owner

travier commented Jan 26, 2021

Thanks for the feedback! Indeed, the way we template secrets is not ideal and does not cover all cases. We tried to find the easiest solution that everyone would have already installed but that may not be the best choice long term. Maybe we should look at a real template language.

@travier travier added enhancement New feature or request help wanted Extra attention is needed labels Jan 26, 2021
@laolux
Copy link
Contributor Author

laolux commented Jan 27, 2021

Yes, I guess some template language could help.
I just ran into another issue: Passwords containing # get cut off short. This can be really dangerous, because it could lead to very very short passwords and you do not find those if you do not check the generated homeserver.yaml. Maybe put a warning about that into the README?

@travier
Copy link
Owner

travier commented Jan 27, 2021

I'm taking a look at tera-cli which is based on tera which is inspired by Jinja2 so should be easy to use in our case.

@laolux
Copy link
Contributor Author

laolux commented Jan 31, 2021

That sounds good to me, but might entail some new dependencies.
I currently do not have the time to get myself started with tera, so I made a small pull request #15 to point others to this potential pitfall.
I am happy to assist trying out tera when you (or someone else) has started implementing it.

@travier
Copy link
Owner

travier commented Feb 1, 2021

Note for later: revert #15 when done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants