mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
Minor/Cosmetic fixes
This commit is contained in:
@@ -2,7 +2,6 @@ package nomad
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
@@ -64,7 +63,7 @@ func prepareTestContainer(t *testing.T) (cleanup func(), retAddress string, noma
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
nomadToken = aclbootstrap.SecretID
|
||||
log.Printf("[WARN] Generated Master token: %s", nomadToken)
|
||||
t.Log("[WARN] Generated Master token: %s", nomadToken)
|
||||
policy := &nomadapi.ACLPolicy{
|
||||
Name: "test",
|
||||
Description: "test",
|
||||
@@ -143,7 +142,7 @@ func TestBackend_config_access(t *testing.T) {
|
||||
|
||||
expected := map[string]interface{}{
|
||||
"address": connData["address"].(string),
|
||||
"scheme": "http",
|
||||
"scheme": "https",
|
||||
}
|
||||
if !reflect.DeepEqual(expected, resp.Data) {
|
||||
t.Fatalf("bad: expected:%#v\nactual:%#v\n", expected, resp.Data)
|
||||
@@ -213,7 +212,7 @@ func TestBackend_renew_revoke(t *testing.T) {
|
||||
if err := mapstructure.Decode(resp.Data, &d); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
log.Printf("[WARN] Generated token: %s with accesor %s", d.Token, d.Accessor)
|
||||
t.Log("[WARN] Generated token: %s with accesor %s", d.Token, d.Accessor)
|
||||
|
||||
// Build a client and verify that the credentials work
|
||||
nomadapiConfig := nomadapi.DefaultConfig()
|
||||
@@ -224,7 +223,7 @@ func TestBackend_renew_revoke(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
log.Printf("[WARN] Verifying that the generated token works...")
|
||||
t.Log("[WARN] Verifying that the generated token works...")
|
||||
_, err = client.Agent().Members, nil
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -256,7 +255,7 @@ func TestBackend_renew_revoke(t *testing.T) {
|
||||
Namespace: "default",
|
||||
}
|
||||
|
||||
log.Printf("[WARN] Verifying that the generated token does not exist...")
|
||||
t.Log("[WARN] Verifying that the generated token does not exist...")
|
||||
_, _, err = mgmtclient.ACLTokens().Info(d.Accessor, q)
|
||||
if err == nil {
|
||||
t.Fatal("err: expected error")
|
||||
|
||||
@@ -20,10 +20,7 @@ func pathConfigAccess() *framework.Path {
|
||||
Type: framework.TypeString,
|
||||
Description: "URI scheme for the Nomad address",
|
||||
|
||||
// https would be a better default but Consul on its own
|
||||
// defaults to HTTP access, and when HTTPS is enabled it
|
||||
// disables HTTP, so there isn't really any harm done here.
|
||||
Default: "http",
|
||||
Default: "https",
|
||||
},
|
||||
|
||||
"token": &framework.FieldSchema{
|
||||
|
||||
@@ -17,8 +17,7 @@ API tokens dynamically based on pre-existing Nomad ACL policies.
|
||||
This page will show a quick start for this backend. For detailed documentation
|
||||
on every path, use `vault path-help` after mounting the backend.
|
||||
|
||||
~> **Version information** ACLs are only available on Nomad 0.7.0 and above,
|
||||
which is currently in beta.
|
||||
~> **Version information** ACLs are only available on Nomad 0.7.0 and above.
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -46,7 +45,7 @@ Create Index = 7
|
||||
Modify Index = 7
|
||||
```
|
||||
The suggested pattern is to generate a token specifically for Vault, following the
|
||||
[Nomad ACL guide](https://www.consul.io/docs/agent/http/acl.html)
|
||||
[Nomad ACL guide](https://www.nomadproject.io/guides/acl.html)
|
||||
|
||||
Next, we must configure Vault to know how to contact Nomad.
|
||||
This is done by writing the access information:
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
<li<%= sidebar_current("docs-http-secret-consul") %>>
|
||||
<a href="/api/secret/consul/index.html">Consul</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-secret-nomad") %>>
|
||||
<a href="/api/secret/nomad/index.html">Nomad</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-secret-cubbyhole") %>>
|
||||
<a href="/api/secret/cubbyhole/index.html">Cubbyhole</a>
|
||||
</li>
|
||||
@@ -59,6 +56,9 @@
|
||||
<li<%= sidebar_current("docs-http-secret-identity") %>>
|
||||
<a href="/api/secret/identity/index.html">Identity</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-secret-nomad") %>>
|
||||
<a href="/api/secret/nomad/index.html">Nomad</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-http-secret-pki") %>>
|
||||
<a href="/api/secret/pki/index.html">PKI</a>
|
||||
</li>
|
||||
|
||||
@@ -179,10 +179,6 @@
|
||||
<a href="/docs/secrets/consul/index.html">Consul</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-secrets-nomad") %>>
|
||||
<a href="/docs/secrets/nomad/index.html">Nomad</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-secrets-cubbyhole") %>>
|
||||
<a href="/docs/secrets/cubbyhole/index.html">Cubbyhole</a>
|
||||
</li>
|
||||
@@ -225,6 +221,10 @@
|
||||
<a href="/docs/secrets/identity/index.html">Identity</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-secrets-nomad") %>>
|
||||
<a href="/docs/secrets/nomad/index.html">Nomad</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-secrets-pki") %>>
|
||||
<a href="/docs/secrets/pki/index.html">PKI (Certificates)</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user