Skip to content

read secret failed: 503 - {"errors":["Vault is sealed"]} #12

@semihural

Description

@semihural

Hi,

I am trying to use appRole auth method as below but when it could not able to read the secret as you can see the below error. What might be the reason of this error or what is the missing point.I can able to read the secret via CLI

| read secret failed: 503 - {"errors":["Vault is sealed"]}
| StatusCodeError: 503 - {"errors":["Vault is sealed"]}
    const VaultClient = require("node-vault-client");

    const vaultClient = VaultClient.boot("main", {
      api: { url: "http://vault:8200" },
      auth: {
        type: "appRole",
        config: { role_id: "5adc1e6c-e686-6461-d3f9-3eade5603208" },
      },
    });

    vaultClient
      .read("secret/data/my-app/database")
      .then((res) => {
        console.log(res);
      })
      .catch((e) => console.error(e));
/ # vault read secret/data/my-app/database
Key                              Value
---                              -----
refresh_interval                 168h
database_password_development    xxx
database_username_development    xxx
/ # vault read auth/approle/role/my-app/role-id
Key        Value
---        -----
role_id    5adc1e6c-e686-6461-d3f9-3eade5603208

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions