github.com/hashicorp/vault/sdk@v0.11.0/helper/wrapping/wrapinfo.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package wrapping
     5  
     6  import "time"
     7  
     8  type ResponseWrapInfo struct {
     9  	// Setting to non-zero specifies that the response should be wrapped.
    10  	// Specifies the desired TTL of the wrapping token.
    11  	TTL time.Duration `json:"ttl" structs:"ttl" mapstructure:"ttl" sentinel:""`
    12  
    13  	// The token containing the wrapped response
    14  	Token string `json:"token" structs:"token" mapstructure:"token" sentinel:""`
    15  
    16  	// The token accessor for the wrapped response token
    17  	Accessor string `json:"accessor" structs:"accessor" mapstructure:"accessor"`
    18  
    19  	// The creation time. This can be used with the TTL to figure out an
    20  	// expected expiration.
    21  	CreationTime time.Time `json:"creation_time" structs:"creation_time" mapstructure:"creation_time" sentinel:""`
    22  
    23  	// If the contained response is the output of a token or approle secret-id creation call, the
    24  	// created token's/secret-id's accessor will be accessible here
    25  	WrappedAccessor string `json:"wrapped_accessor" structs:"wrapped_accessor" mapstructure:"wrapped_accessor" sentinel:""`
    26  
    27  	// WrappedEntityID is the entity identifier of the caller who initiated the
    28  	// wrapping request
    29  	WrappedEntityID string `json:"wrapped_entity_id" structs:"wrapped_entity_id" mapstructure:"wrapped_entity_id" sentinel:""`
    30  
    31  	// The format to use. This doesn't get returned, it's only internal.
    32  	Format string `json:"format" structs:"format" mapstructure:"format" sentinel:""`
    33  
    34  	// CreationPath is the original request path that was used to create
    35  	// the wrapped response.
    36  	CreationPath string `json:"creation_path" structs:"creation_path" mapstructure:"creation_path" sentinel:""`
    37  
    38  	// Controls seal wrapping behavior downstream for specific use cases
    39  	SealWrap bool `json:"seal_wrap" structs:"seal_wrap" mapstructure:"seal_wrap" sentinel:""`
    40  }