Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Nomad add acl Certification

Shulou Source: shulou.com Published: 2022-06-02 19:18:55 11月14日 Update

1. Add and enable acl in the configuration file / etc/nomad/server.hcl of the server node, as follows:

Server {

Enabled = true

Bootstrap_expect = 1

}

Acl {

Enabled = true

Token_ttl = "30s"

Policy_ttl = "60s"

}

Restart the nomad service after configuration is added: service nomad restart

2. Generate the initial token

After enabling the ACL system, we need to generate the initial token. The first token is used to boot the system and should be careful not to lose it. After enabling the ACL system, we use Bootstrap CLI

Nomad acl bootstrap

Accessor ID = 5b7fd453-d3f7-6814-81dc-fcfe6daedea5

Secret ID = 9184ec35-65d4-9258-61e3-0c066d0a45c5

Name = Bootstrap Token

Type = management

Global = true

Policies = nbat a

Create Time = 2017-09-11 17 38 10.999089612 + 0000 UTC

Create Index = 7

Modify Index = 7

After the initial boot, it cannot be performed again unless it is reset. Be sure to save this AccessorID and SecretID. The boot token is a management type token, which means it can do anything. It should be used to set the ACL policy and create additional ACL tokens. Boot tokens can be deleted, just like any other token, so you should be careful not to revoke all administrative tokens.

3. Set anonymity policy

Store our token secret ID

Export NOMAD_TOKEN= "BOOTSTRAP_SECRET_ID"

Write out the payload

Cat > payload.json

Tags: Tokens policies systems rules resources languages generation configuration human again multiple meaning policy quantity file method machine core format type Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB macOS Huawei MySQL Docker