{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/vault/issues/877","labels_url":"https://api.github.com/repos/hashicorp/vault/issues/877/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/vault/issues/877/comments","events_url":"https://api.github.com/repos/hashicorp/vault/issues/877/events","html_url":"https://github.com/hashicorp/vault/issues/877","id":123026866,"number":877,"title":"No lease_id provided when getting secret","user":{"login":"kenjones-cisco","id":7967510,"avatar_url":"https://avatars.githubusercontent.com/u/7967510?v=3","gravatar_id":"","url":"https://api.github.com/users/kenjones-cisco","html_url":"https://github.com/kenjones-cisco","followers_url":"https://api.github.com/users/kenjones-cisco/followers","following_url":"https://api.github.com/users/kenjones-cisco/following{/other_user}","gists_url":"https://api.github.com/users/kenjones-cisco/gists{/gist_id}","starred_url":"https://api.github.com/users/kenjones-cisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenjones-cisco/subscriptions","organizations_url":"https://api.github.com/users/kenjones-cisco/orgs","repos_url":"https://api.github.com/users/kenjones-cisco/repos","events_url":"https://api.github.com/users/kenjones-cisco/events{/privacy}","received_events_url":"https://api.github.com/users/kenjones-cisco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-18T21:12:50Z","updated_at":"2015-12-19T00:44:56Z","closed_at":null,"body":"Following the documentation @ https://vaultproject.io/intro/getting-started/apis.html The `lease_id` is not provided like in the example. \r\n\r\nWhat is required to get the `lease_id`?\r\n\r\n#### Steps taken and responses\r\n\r\n```\r\n$ curl -X PUT -d '{\"secret_shares\":1, \"secret_threshold\":1}'  http://localhost:8200/v1/sys/init\r\n{\"keys\":[\"db5d4af39932a4c3f1c394aa96129884601e470dba05a0308393410ade4849a4\"],\"root_token\":\"978d22d3-3390-35eb-e842-808890240dee\"}\r\n\r\n$ export VAULT_TOKEN=978d22d3-3390-35eb-e842-808890240dee\r\n\r\n$ curl -X PUT -d '{\"key\": \"db5d4af39932a4c3f1c394aa96129884601e470dba05a0308393410ade4849a4\"}' http://127.0.0.1:8200/v1/sys/unseal\r\n{\"sealed\":false,\"t\":1,\"n\":1,\"progress\":0}\r\n\r\n$ curl \\\r\n>     -X POST \\\r\n>     -H \"X-Vault-Token:$VAULT_TOKEN\" \\\r\n>     -d '{\"type\":\"app-id\"}' \\\r\n>     http://127.0.0.1:8200/v1/sys/auth/app-id\r\n\r\n$ curl \\\r\n>     -X POST \\\r\n>     -H \"X-Vault-Token:$VAULT_TOKEN\" \\\r\n>     -d '{\"value\":\"root\", \"display_name\":\"demo\"}' \\\r\n>     http://localhost:8200/v1/auth/app-id/map/app-id/152AEA38-85FB-47A8-9CBD-612D645BFACA\r\n\r\n$ curl \\\r\n>     -X POST \\\r\n>     -H \"X-Vault-Token:$VAULT_TOKEN\" \\\r\n>     -d '{\"value\":\"152AEA38-85FB-47A8-9CBD-612D645BFACA\"}' \\\r\n>     http://localhost:8200/v1/auth/app-id/map/user-id/5ADF8218-D7FB-4089-9E38-287465DBF37E\r\n\r\n$ curl \\\r\n>     -X POST \\\r\n>     -d '{\"app_id\":\"152AEA38-85FB-47A8-9CBD-612D645BFACA\", \"user_id\": \"5ADF8218-D7FB-4089-9E38-287465DBF37E\"}' \\\r\n>     \"http://127.0.0.1:8200/v1/auth/app-id/login\"\r\n{\"lease_id\":\"\",\"renewable\":false,\"lease_duration\":0,\"data\":null,\"warnings\":null,\"auth\":{\"client_token\":\"3bf8007c-5351-fa32-97ca-a527d5e5caf8\",\"policies\":[\"root\"],\"metadata\":{\"app-id\":\"sha1:1c0401b419280b0771d006bcdae683989086a00e\",\"user-id\":\"sha1:4dbf74fce71648d54c42e28ad193253600853ca6\"},\"lease_duration\":0,\"renewable\":false}}\r\n\r\n$ export VAULT_TOKEN=3bf8007c-5351-fa32-97ca-a527d5e5caf8\r\n\r\n$ curl \\\r\n>     -X POST \\\r\n>     -H \"X-Vault-Token:$VAULT_TOKEN\" \\\r\n>     -H 'Content-type: application/json' \\\r\n>     -d '{\"bar\":\"baz\"}' \\\r\n>     http://127.0.0.1:8200/v1/secret/foo\r\n\r\n$ curl \\\r\n>     -H \"X-Vault-Token:$VAULT_TOKEN\" \\\r\n>     http://127.0.0.1:8200/v1/secret/foo\r\n{\"lease_id\":\"\",\"renewable\":false,\"lease_duration\":2592000,\"data\":{\"bar\":\"baz\"},\"warnings\":null,\"auth\":null}\r\n```\r\n\r\n#### Vault Logs\r\n\r\n```\r\n$ vault server --config=config/dev.hcl -log-level=debug\r\n==> WARNING: mlock not supported on this system!\r\n\r\n  The `mlock` syscall to prevent memory from being swapped to\r\n  disk is not supported on this system. Enabling mlock or\r\n  running Vault on a system with mlock is much more secure.\r\n\r\n==> Vault server configuration:\r\n\r\n         Log Level: debug\r\n             Mlock: supported: false, enabled: false\r\n           Backend: inmem\r\n        Listener 1: tcp (addr: \"0.0.0.0:8200\", tls: \"disabled\")\r\n           Version: Vault v0.4.0\r\n\r\n==> Vault server started! Log data will stream in below:\r\n\r\n2015/12/18 16:06:51 [INFO] core: security barrier initialized (shares: 1, threshold 1)\r\n2015/12/18 16:06:51 [INFO] core: post-unseal setup starting\r\n2015/12/18 16:06:51 [INFO] core: mounted backend of type generic at logical/a7b18ee9-bc81-1eec-1790-f24adbd49cf5/\r\n2015/12/18 16:06:51 [INFO] core: mounted backend of type cubbyhole at logical/e437d652-feda-51df-3331-bfee7b2a3918/\r\n2015/12/18 16:06:51 [INFO] core: mounted backend of type system at sys/\r\n2015/12/18 16:06:51 [INFO] rollback: starting rollback manager\r\n2015/12/18 16:06:51 [INFO] core: post-unseal setup complete\r\n2015/12/18 16:06:51 [INFO] core: root token generated\r\n2015/12/18 16:06:51 [INFO] core: pre-seal teardown starting\r\n2015/12/18 16:06:51 [INFO] rollback: stopping rollback manager\r\n2015/12/18 16:06:51 [INFO] core: pre-seal teardown complete\r\n2015/12/18 16:08:08 [INFO] core: vault is unsealed\r\n2015/12/18 16:08:08 [INFO] core: post-unseal setup starting\r\n2015/12/18 16:08:08 [INFO] core: mounted backend of type generic at logical/a7b18ee9-bc81-1eec-1790-f24adbd49cf5/\r\n2015/12/18 16:08:08 [INFO] core: mounted backend of type cubbyhole at logical/e437d652-feda-51df-3331-bfee7b2a3918/\r\n2015/12/18 16:08:08 [INFO] core: mounted backend of type system at sys/\r\n2015/12/18 16:08:08 [INFO] rollback: starting rollback manager\r\n2015/12/18 16:08:08 [INFO] core: post-unseal setup complete\r\n2015/12/18 16:08:27 [INFO] core: enabled credential backend 'app-id/' type: app-id\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/vault/issues/comments/165928187","html_url":"https://github.com/hashicorp/vault/issues/877#issuecomment-165928187","issue_url":"https://api.github.com/repos/hashicorp/vault/issues/877","id":165928187,"user":{"login":"jefferai","id":28627,"avatar_url":"https://avatars.githubusercontent.com/u/28627?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferai","html_url":"https://github.com/jefferai","followers_url":"https://api.github.com/users/jefferai/followers","following_url":"https://api.github.com/users/jefferai/following{/other_user}","gists_url":"https://api.github.com/users/jefferai/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferai/subscriptions","organizations_url":"https://api.github.com/users/jefferai/orgs","repos_url":"https://api.github.com/users/jefferai/repos","events_url":"https://api.github.com/users/jefferai/events{/privacy}","received_events_url":"https://api.github.com/users/jefferai/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T00:44:56Z","updated_at":"2015-12-19T00:44:56Z","body":"That documentation needs to be updated; since 0.3 the `generic` backend no longer generates leases. I'll make sure it's updated...thanks for reporting it!"}}