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

BASIC AUTH on all pages #69

Open
harperaa opened this issue Jun 12, 2024 · 0 comments
Open

BASIC AUTH on all pages #69

harperaa opened this issue Jun 12, 2024 · 0 comments
Labels
💡 feature request New feature or request

Comments

@harperaa
Copy link

harperaa commented Jun 12, 2024

Describe Problem

It would be nice to automatically install BASIC AUTH on all pages, on the nginx ingress controller, to keep all others out of competition...

Suggest Solution

https://kubernetes.github.io/ingress-nginx/examples/auth/basic/

Additional Details

I have this working, as per this script... have to add the following kubectl command in manage-multijuicer.sh

...
function deploy_multi_juicer() {
    info "Deploying multi-juicer"
    # Enable OCI support
    export HELM_EXPERIMENTAL_OCI=1
    
    # Store auth file key for basic auth
    kubectl --namespace juicer create secret generic basic-auth --from-file=auth
...

Also, have to update ingress.yaml, to include:

...
metadata:
  name: multi-juicer-ingress
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    # type of authentication
    nginx.ingress.kubernetes.io/auth-type: basic
    # name of the secret that contains the user/password definitions
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    # message to display with an appropriate context why the authentication is required
    nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - foo'
...

Also, have to add the following line to each curl call in manage-ctf.sh

    -u 'foo:<password>'  \

I am surprised, this is not standard in CTFd and Multijuicer, but it is better done in the nginx controller...

@harperaa harperaa added the 💡 feature request New feature or request label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant