UserSecurityContext Class
- java.
lang. Object - com.
azure. ai. openai. models. UserSecurityContext
- com.
Implements
public final class UserSecurityContext
implements JsonSerializable<UserSecurityContext>
User security context contains several parameters that describe the AI application itself, and the end user that interacts with the AI application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. (Learn more at https://aka.ms/TP4AI/Documentation/EndUserContext) about protecting AI applications using Microsoft Defender for Cloud.
Constructor Summary
| Constructor | Description |
|---|---|
| UserSecurityContext() |
Creates an instance of User |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
User |
fromJson(JsonReader jsonReader)
Reads an instance of User |
| String |
getApplicationName()
Get the application |
| String |
getEndUserId()
Get the end |
| String |
getEndUserTenantId()
Get the end |
| String |
getSourceIp()
Get the source |
|
User |
setApplicationName(String applicationName)
Set the application |
|
User |
setEndUserId(String endUserId)
Set the end |
|
User |
setEndUserTenantId(String endUserTenantId)
Set the end |
|
User |
setSourceIp(String sourceIp)
Set the source |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
UserSecurityContext
public UserSecurityContext()
Creates an instance of UserSecurityContext class.
Method Details
fromJson
public static UserSecurityContext fromJson(JsonReader jsonReader)
Reads an instance of UserSecurityContext from the JsonReader.
Parameters:
Returns:
Throws:
getApplicationName
public String getApplicationName()
Get the applicationName property: The name of the application. Sensitive personal information should not be included in this field.
Returns:
getEndUserId
public String getEndUserId()
Get the endUserId property: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field.
Returns:
getEndUserTenantId
public String getEndUserTenantId()
Get the endUserTenantId property: The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multi tenant.
Returns:
getSourceIp
public String getSourceIp()
Get the sourceIp property: Captures the original client's IP address, accepting both IPv4 and IPv6 formats.
Returns:
setApplicationName
public UserSecurityContext setApplicationName(String applicationName)
Set the applicationName property: The name of the application. Sensitive personal information should not be included in this field.
Parameters:
Returns:
setEndUserId
public UserSecurityContext setEndUserId(String endUserId)
Set the endUserId property: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field.
Parameters:
Returns:
setEndUserTenantId
public UserSecurityContext setEndUserTenantId(String endUserTenantId)
Set the endUserTenantId property: The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multi tenant.
Parameters:
Returns:
setSourceIp
public UserSecurityContext setSourceIp(String sourceIp)
Set the sourceIp property: Captures the original client's IP address, accepting both IPv4 and IPv6 formats.
Parameters:
Returns: