Class RequestAttributes

public class RequestAttributes

Request attributes used in IAM condition evaluation. This field contains request attributes like request time and access levels associated with the request. To get the whole view of the attributes used in IAM condition evaluation, the user must also look into `AuditLog.authentication_info.resource_attributes`.

Inheritance

java.lang.Object > RequestAttributes

Constructors

RequestAttributes()

public RequestAttributes()

Methods

getAuth()

public Auth getAuth()

The request authentication. May be absent for unauthenticated requests. Derived from the HTTP request `Authorization` header or equivalent.

Returns
TypeDescription
Auth

getHeaders()

public Map<String,String> getHeaders()

The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

Returns
TypeDescription
Map<String,String>

getHost()

public String getHost()

The HTTP request `Host` header value.

Returns
TypeDescription
String

getID()

public String getID()

The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service.

Returns
TypeDescription
String

getMethod()

public String getMethod()

The HTTP request method, such as `GET`, `POST`.

Returns
TypeDescription
String

getPath()

public String getPath()

The HTTP URL path.

Returns
TypeDescription
String

getProtocol()

public String getProtocol()

The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.

Returns
TypeDescription
String

getQuery()

public String getQuery()

The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request. No decoding is performed.

Returns
TypeDescription
String

getReason()

public String getReason()

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

Returns
TypeDescription
String

getScheme()

public String getScheme()

The HTTP URL scheme, such as `http` and `https`.

Returns
TypeDescription
String

getSize()

public Long getSize()

The HTTP request size in bytes. If unknown, it must be -1.

Returns
TypeDescription
Long

getTime()

public OffsetDateTime getTime()

The timestamp when the `destination` service receives the first byte of the request.

Returns
TypeDescription
OffsetDateTime

setAuth(Auth value)

public void setAuth(Auth value)
Parameter
NameDescription
valueAuth

setHeaders(Map<String,String> value)

public void setHeaders(Map<String,String> value)
Parameter
NameDescription
valueMap<String,String>

setHost(String value)

public void setHost(String value)
Parameter
NameDescription
valueString

setID(String value)

public void setID(String value)
Parameter
NameDescription
valueString

setMethod(String value)

public void setMethod(String value)
Parameter
NameDescription
valueString

setPath(String value)

public void setPath(String value)
Parameter
NameDescription
valueString

setProtocol(String value)

public void setProtocol(String value)
Parameter
NameDescription
valueString

setQuery(String value)

public void setQuery(String value)
Parameter
NameDescription
valueString

setReason(String value)

public void setReason(String value)
Parameter
NameDescription
valueString

setScheme(String value)

public void setScheme(String value)
Parameter
NameDescription
valueString

setSize(Long value)

public void setSize(Long value)
Parameter
NameDescription
valueLong

setTime(OffsetDateTime value)

public void setTime(OffsetDateTime value)
Parameter
NameDescription
valueOffsetDateTime