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

[DRAFT] http basic auth acl policy #116

Conversation

austenLacy
Copy link

What

Adds a custom shopify basic auth http ACL policy. It works by checking for a basic username and password.

Manual testing

Set env vars with username and password for testing

~/src/github.com/Shopify/vitess$ export SHOPIFY_BASIC_AUTH_USERNAME=user
~/src/github.com/Shopify/vitess$ export SHOPIFY_BASIC_AUTH_PASSWORD=pass

Verify it denies access if no basic auth creds

~/src/github.com/Shopify/vitess$ curl localhost:15100/debug/env
Access denied: not allowed: shopify_basic_auth security_policy enforced

Verify it works with a valid basic auth creds

~/src/github.com/Shopify/vitess$ curl -u "user:pass" localhost:15100/debug/env
<!DOCTYPE html>
        <style type="text/css">
                        table.gridtable {
                                font-family: verdana,arial,sans-serif;
                                font-size: 11px;
                                border-width: 1px;
                                border-collapse: collapse; table-layout:fixed; overflow: hidden;
                        }
                        table.gridtable th {
                                border-width: 1px;
                                padding: 8px;
                                border-style: solid;
                                background-color: #dedede;
                                white-space: nowrap;
                        }
                        table.gridtable td {
                                border-width: 1px;
                                padding: 5px;
                                border-style: solid;
                        }
                        table.gridtable th {
                                padding-left: 2em;
                                padding-right: 2em;
                        }
        </style>
        <h3>Internal Variables</h3>
... # cut off for brevity

Verify that bad creds are rejected

~/src/github.com/Shopify/vitess$ curl -u "not:valid" localhost:15100/debug/env
Access denied: not allowed: shopify_basic_auth security_policy enforced

@github-actions
Copy link

github-actions bot commented Sep 7, 2023

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label Sep 7, 2023
@github-actions
Copy link

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot removed the Stale label Sep 16, 2023
@github-actions
Copy link

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label Oct 16, 2023
@github-actions
Copy link

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant