adding ids
This commit is contained in:
parent
8d52a96df5
commit
ae8a90be30
|
@ -35,6 +35,7 @@ func SanitizeResponse(input *Response) *HTTPResponse {
|
|||
}
|
||||
|
||||
type HTTPResponse struct {
|
||||
RequestID string `json:"request_id"`
|
||||
LeaseID string `json:"lease_id"`
|
||||
Renewable bool `json:"renewable"`
|
||||
LeaseDuration int `json:"lease_duration"`
|
||||
|
|
|
@ -424,7 +424,15 @@ func (c *Core) wrapInCubbyhole(req *logical.Request, resp *logical.Response) (*l
|
|||
return nil, ErrInternalError
|
||||
}
|
||||
|
||||
var requestid string
|
||||
requestid, err = uuid.generateUUID()
|
||||
if err != nil {
|
||||
c.logger.Printf("[ERR] core: failed to generate unique identifier: %v", err)
|
||||
return nil, ErrInternalError
|
||||
}
|
||||
|
||||
cubbyReq := &logical.Request{
|
||||
ID: requestid,
|
||||
Operation: logical.CreateOperation,
|
||||
Path: "cubbyhole/response",
|
||||
ClientToken: te.ID,
|
||||
|
|
Loading…
Reference in New Issue