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

create a secured cluster with ACL for validation #57

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Conversation

jagedn
Copy link
Collaborator

@jagedn jagedn commented Jul 3, 2024

If you provide the --secure argument when creating the local cluster the script will initialize it using ACL

The management token will be showed by console. You need to provide this token (i.e. NOMAD_TOKEN env) to run the pipeline

Signed-off-by: Jorge Aguilera <jorge@edn.es>
@jagedn jagedn requested review from abhi18av and jhaezebr July 3, 2024 14:34
@abhi18av abhi18av linked an issue Jul 3, 2024 that may be closed by this pull request
Copy link
Member

@abhi18av abhi18av left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge ✅

Though I do suggest that we hold off a it before merging the PR/ or making a new release till we have had a sync regarding the next steps - what do you think? @jhaezebr @jagedn

Ideally we can also cover the HTTPS setup in this iteration together, since a prod cluster would actually make use of SSL certs.

@jagedn
Copy link
Collaborator Author

jagedn commented Jul 3, 2024

yes, good idea

Copy link
Collaborator

@jhaezebr jhaezebr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Later we can add some more specific policies to test with minimal permissions

@abhi18av
Copy link
Member

abhi18av commented Jul 4, 2024

Good then @jhaezebr , could you please setup HTTPS in the az-nomadlab setup? Then we can add then and test it immediately.

Also, quick reminder if you're going to change the terraform template, could you please make the manager node as a nomad server as well? This way we would not need to the SSH hopping for the portal.

@jhaezebr
Copy link
Collaborator

jhaezebr commented Jul 4, 2024

This would mean that the nomad cluster UI is open to the internet. Is that safe enough?

@tomiles
Copy link
Collaborator

tomiles commented Jul 4, 2024

Security wise I would not advise opening up the nomad server api ports. The added step to start an ssh tunnel isn't too much overhead during development. If the use case is automatic testing that can be managed by running a self-hosted runner since those only do outgoing long-poll requests over https and no incoming ports need to be opened.

@abhi18av
Copy link
Member

abhi18av commented Jul 4, 2024

Ah good point - then perhaps we can just

  1. whitelist just one port from the vnet and make use of policies to control the accessibility.
  2. whitelist our specific IPs in the vnet and remove the public access for unknown IPs

In case that's not secure or useful then please feel free to disagree and suggest what you feel is the best option, happy to go along with that 👍

The baseline idea is to have as less of a friction in dev-time iterations as possible :)

@jagedn jagedn added the enhancement New feature or request label Jul 6, 2024
@jagedn jagedn merged commit 1eb0b9a into master Jul 9, 2024
2 checks passed
@jagedn jagedn deleted the nomad-acl branch July 9, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error running nf-nomad with acl enabled
5 participants