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

datasette publish option for setting plugin configuration secrets #543

Closed
simonw opened this issue Jul 6, 2019 · 3 comments
Closed

datasette publish option for setting plugin configuration secrets #543

simonw opened this issue Jul 6, 2019 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Jul 6, 2019

Follow-on from #538 - the datasette publish command needs a way of passing secrets which will be made available to plugin configuration but will not be exposed in /-/metadata.json.

@simonw
Copy link
Owner Author

simonw commented Jul 6, 2019

Potential design:

$ datasette publish --plugin-secret datasette-auth-github client_id xxx

This would populate the following in metadata.json:

{
    "plugins": {
        "datasette-auth-github": {
            "client_id": {"$env": "DATASETTE_AUTH_GITHUB_CLIENT_ID"}
        }
    }
}

And would ensure that the environment variable DATASETTE_AUTH_GITHUB_CLIENT_ID is set to the correct value.

@simonw
Copy link
Owner Author

simonw commented Jul 6, 2019

As soon as I have this working I can use it to ship a live demo of https://github.com/simonw/datasette-auth-github

@simonw
Copy link
Owner Author

simonw commented Jul 6, 2019

$ datasette publish now fixtures.db \
    --branch=master \
    --alias datasette-auth-demo \
    --install=datasette-auth-github \
    --plugin-secret datasette-auth-github client_id 86e397f7fd7a54d26a3a \
    --plugin-secret datasette-auth-github client_secret ...

https://datasette-auth-demo.now.sh/

simonw added a commit that referenced this issue Jul 6, 2019
@simonw simonw mentioned this issue Jul 6, 2019
6 tasks
@simonw simonw added medium and removed small labels Jul 6, 2019
@simonw simonw pinned this issue Jul 6, 2019
@simonw simonw added this to the Datasette 0.29 milestone Jul 7, 2019
@simonw simonw unpinned this issue Jul 7, 2019
@simonw simonw closed this as completed in 973f8f1 Jul 8, 2019
simonw added a commit that referenced this issue Nov 11, 2019
Closes #543

Also added new --show-files option to publish now and publish cloudrun - handy for debugging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant