Skip to content

[BUG] unwrap response without auth  #3

@tledkov

Description

@tledkov

Error stacktrace:

com.bettercloud.vault.VaultException: java.lang.UnsupportedOperationException: Not an object: null
at com.bettercloud.vault.api.Auth.unwrap([Auth.java:1586](http://auth.java:1586/))
at com.bettercloud.vault.api.Auth.unwrap([Auth.java:1506](http://auth.java:1506/))
at ru.sbrf.kafka.config.provider.secman.SecretReader.login([SecretReader.java:82](http://secretreader.java:82/))
 
Caused by: java.lang.UnsupportedOperationException: Not an object: null
at com.bettercloud.vault.json.JsonValue.asObject([JsonValue.java:144](http://jsonvalue.java:144/))
at com.bettercloud.vault.response.AuthResponse.<init>([AuthResponse.java:41](http://authresponse.java:41/))

Example request to Vault by HashiCorp

curl --location --request POST 'http://127.0.0.1:8200/v1/sys/wrapping/unwrap' \
--header 'X-Vault-Token: s.JqBHMFEyIQy1i2tIisfXfYrI' \
--header 'Content-Type: application/json' \
--data-raw '{
  "token": "s.Z4UQgIfiDsqIwELuIInamXEl"
}':

Response:

{
    "request_id": "ccf41e8c-cab1-4b2c-d2c6-9faf81fb526c",
    "lease_id": "",
    "renewable": false,
    "lease_duration": 0,
    "data": {
        "foo": "bar",
        "zip": "zap"
    },
    "wrap_info": null,
    "warnings": null,
    "auth": null
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions