Search in sources :

Example 1 with ServiceActions

use of org.codice.ddf.internal.admin.configurator.actions.ServiceActions in project admin-console-beta by connexta.

the class SecurityValidation method validateStsClaimsExist.

public static Report validateStsClaimsExist(List<StringField> claimArgs, ServiceActions serviceActions, StsServiceProperties stsServiceProps) {
    Report report = Reports.emptyReport();
    List<String> supportedClaims = stsServiceProps.getConfiguredStsClaims(serviceActions);
    claimArgs.stream().filter(claimArg -> !supportedClaims.contains(claimArg.getValue())).forEach(claimArg -> report.addErrorMessage(invalidClaimType(claimArg.getPath())));
    return report;
}
Also used : List(java.util.List) Reports(org.codice.ddf.admin.common.report.Reports) SecurityMessages.invalidClaimType(org.codice.ddf.admin.security.common.SecurityMessages.invalidClaimType) ServiceActions(org.codice.ddf.internal.admin.configurator.actions.ServiceActions) Report(org.codice.ddf.admin.api.report.Report) StringField(org.codice.ddf.admin.common.fields.base.scalar.StringField) StsServiceProperties(org.codice.ddf.admin.security.common.services.StsServiceProperties) Report(org.codice.ddf.admin.api.report.Report)

Aggregations

List (java.util.List)1 Report (org.codice.ddf.admin.api.report.Report)1 StringField (org.codice.ddf.admin.common.fields.base.scalar.StringField)1 Reports (org.codice.ddf.admin.common.report.Reports)1 SecurityMessages.invalidClaimType (org.codice.ddf.admin.security.common.SecurityMessages.invalidClaimType)1 StsServiceProperties (org.codice.ddf.admin.security.common.services.StsServiceProperties)1 ServiceActions (org.codice.ddf.internal.admin.configurator.actions.ServiceActions)1