Skip to content

Commit

Permalink
feat(IAM Identity): add comply_state variable to mfa report (#220)
Browse files Browse the repository at this point in the history
Signed-off-by: Somanath Chavan <[email protected]>
  • Loading branch information
Somchavan authored Nov 14, 2023
1 parent 53fd7e2 commit 010c798
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.74.0-89f1dbab-20230630-160213
* IBM OpenAPI SDK Code Generator Version: 3.80.0-29334a73-20230925-151553
*/

package com.ibm.cloud.platform_services.iam_identity.v1;
Expand Down Expand Up @@ -474,7 +474,7 @@ public ServiceCall<Void> unlockApiKey(UnlockApiKeyOptions unlockApiKeyOptions) {
*
* Returns a list of service IDs. Users can manage user API keys for themself, or service ID API keys for service IDs
* that are bound to an entity they have access to. Note: apikey details are only included in the response when
* creating a Service ID with an apikey.
* creating a Service ID with an api key.
*
* @param listServiceIdsOptions the {@link ListServiceIdsOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link ServiceIdList}
Expand Down Expand Up @@ -520,7 +520,7 @@ public ServiceCall<ServiceIdList> listServiceIds(ListServiceIdsOptions listServi
*
* Returns a list of service IDs. Users can manage user API keys for themself, or service ID API keys for service IDs
* that are bound to an entity they have access to. Note: apikey details are only included in the response when
* creating a Service ID with an apikey.
* creating a Service ID with an api key.
*
* @return a {@link ServiceCall} with a result of type {@link ServiceIdList}
*/
Expand Down Expand Up @@ -572,7 +572,7 @@ public ServiceCall<ServiceId> createServiceId(CreateServiceIdOptions createServi
*
* Returns the details of a service ID. Users can manage user API keys for themself, or service ID API keys for
* service IDs that are bound to an entity they have access to. Note: apikey details are only included in the response
* when creating a Service ID with an apikey.
* when creating a Service ID with an api key.
*
* @param getServiceIdOptions the {@link GetServiceIdOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link ServiceId}
Expand Down Expand Up @@ -1983,7 +1983,7 @@ public ServiceCall<ReportReference> createReport(CreateReportOptions createRepor
}

/**
* Get activity report across on account scope.
* Get activity report for the account.
*
* Get activity report for the account by specifying the account ID and the reference that is generated by triggering
* the report. Reports older than a day are deleted when generating a new report.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public interface RestrictCreatePlatformApikey {
/**
* Defines the MFA trait for the account. Valid values:
* * NONE - No MFA trait set
* * NONE_NO_ROPC- No MFA, disable CLI logins with only a password
* * TOTP - For all non-federated IBMId users
* * TOTP4ALL - For all users
* * LEVEL1 - Email-based MFA for all users
Expand All @@ -66,6 +67,8 @@ public interface RestrictCreatePlatformApikey {
public interface Mfa {
/** NONE. */
String NONE = "NONE";
/** NONE_NO_ROPC. */
String NONE_NO_ROPC = "NONE_NO_ROPC";
/** TOTP. */
String TOTP = "TOTP";
/** TOTP4ALL. */
Expand Down Expand Up @@ -343,6 +346,7 @@ public String allowedIpAddresses() {
*
* Defines the MFA trait for the account. Valid values:
* * NONE - No MFA trait set
* * NONE_NO_ROPC- No MFA, disable CLI logins with only a password
* * TOTP - For all non-federated IBMId users
* * TOTP4ALL - For all users
* * LEVEL1 - Email-based MFA for all users
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public String type() {
/**
* Gets the duration.
*
* Optional duration of the report, supported unit of duration is hours.
* Optional duration of the report. The supported unit of duration is hours.
*
* @return the duration
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,31 @@ public interface TraitEffective {
String LEVEL3 = "LEVEL3";
}

/**
* Defines comply state for the account. Valid values:
* * NO - User does not comply in the given account.
* * ACCOUNT- User complies in the given account, but does not comply in at least one of the other account
* memberships.
* * CROSS_ACCOUNT - User complies in the given account and across all other account memberships.
*/
public interface ComplyState {
/** NO. */
String NO = "NO";
/** ACCOUNT. */
String ACCOUNT = "ACCOUNT";
/** CROSS_ACCOUNT. */
String CROSS_ACCOUNT = "CROSS_ACCOUNT";
}

@SerializedName("trait_account_default")
protected String traitAccountDefault;
@SerializedName("trait_user_specific")
protected String traitUserSpecific;
@SerializedName("trait_effective")
protected String traitEffective;
protected Boolean complies;
@SerializedName("comply_state")
protected String complyState;

protected IdBasedMfaEnrollment() { }

Expand Down Expand Up @@ -175,5 +193,20 @@ public String getTraitEffective() {
public Boolean isComplies() {
return complies;
}

/**
* Gets the complyState.
*
* Defines comply state for the account. Valid values:
* * NO - User does not comply in the given account.
* * ACCOUNT- User complies in the given account, but does not comply in at least one of the other account
* memberships.
* * CROSS_ACCOUNT - User complies in the given account and across all other account memberships.
*
* @return the complyState
*/
public String getComplyState() {
return complyState;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public Builder newBuilder() {
/**
* Gets the claim.
*
* The claim to evaluate against.
* The claim to evaluate against. [Learn
* more](/docs/account?topic=account-iam-condition-properties&amp;interface=ui#cr-attribute-names).
*
* @return the claim
*/
Expand Down
Loading

0 comments on commit 010c798

Please sign in to comment.