Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the http://schemas.xmlsoap.org/ws/2005/05/identity dialect from the new console #4234

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/rare-teachers-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@wso2is/theme": patch
"@wso2is/console": patch
"@wso2is/i18n": patch
---

Remove the http://schemas.xmlsoap.org/ws/2005/05/identity dialect from the new console
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export class ClaimManagementConstants {
public static readonly AXSCHEMA: string = "axschema";
public static readonly EIDAS: string = "eidas";
public static readonly OPENID: string = "openid";
public static readonly XMLSOAP: string = "xmlsoap";
public static readonly OTHERS: string = "others";

public static readonly SCIM_TABS: {
Expand Down
22 changes: 2 additions & 20 deletions apps/console/src/features/claims/pages/attribute-mappings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ export const AttributeMappings: FunctionComponent<RouteChildrenProps<AttributeMa
return t(
"console:manage.features.claims.attributeMappings.openid.heading"
);
case ClaimManagementConstants.XMLSOAP:
return t(
"console:manage.features.claims.attributeMappings.xmlsoap.heading"
);
default:
return t(
"console:manage.features.claims.attributeMappings.custom.heading"
Expand Down Expand Up @@ -224,8 +220,6 @@ export const AttributeMappings: FunctionComponent<RouteChildrenProps<AttributeMa
return t("console:manage.features.claims.attributeMappings.eidas.description");
case ClaimManagementConstants.OPENID:
return t("console:manage.features.claims.attributeMappings.openid.description");
case ClaimManagementConstants.XMLSOAP:
return t("console:manage.features.claims.attributeMappings.xmlsoap.description");
default:
return t(
"console:manage.features.claims.attributeMappings.custom.description"
Expand Down Expand Up @@ -296,17 +290,6 @@ export const AttributeMappings: FunctionComponent<RouteChildrenProps<AttributeMa
floated="left"
/>
);
case ClaimManagementConstants.XMLSOAP:
return (
<GenericIcon
verticalAlign="middle"
rounded
icon={ getTechnologyLogos().xmlsoap }
spaced="right"
size="tiny"
floated="left"
/>
);
default:
return (
<Image floated="left" verticalAlign="middle" rounded centered size="tiny">
Expand Down Expand Up @@ -348,7 +331,8 @@ export const AttributeMappings: FunctionComponent<RouteChildrenProps<AttributeMa
);
}

return claim.id !== "local";
return claim.id !== "local" &&
claim.id !== ClaimManagementConstants.ATTRIBUTE_DIALECT_IDS.get("XML_SOAP");
});

const attributeMappings: ClaimDialect[] = [];
Expand All @@ -366,8 +350,6 @@ export const AttributeMappings: FunctionComponent<RouteChildrenProps<AttributeMa
type === ClaimManagementConstants.EIDAS && attributeMappings.push(attributeMapping);
} else if (ClaimManagementConstants.OPENID_MAPPING === attributeMapping.dialectURI) {
type === ClaimManagementConstants.OPENID && attributeMappings.push(attributeMapping);
} else if (ClaimManagementConstants.XMLSOAP_MAPPING === attributeMapping.dialectURI) {
type === ClaimManagementConstants.XMLSOAP && attributeMappings.push(attributeMapping);
} else if (type === ClaimManagementConstants.OTHERS) {
attributeMappings.push(attributeMapping);
}
Expand Down
95 changes: 3 additions & 92 deletions apps/console/src/features/claims/pages/claim-dialects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const ClaimDialectsPage: FunctionComponent<ClaimDialectsPageInterface> = (
const [ axschemaAttributeMappings, setAxschemaAttributeMappings ] = useState<ClaimDialect[]>([]);
const [ eidasAttributeMappings, setEidasAttributeMappings ] = useState<ClaimDialect[]>([]);
const [ openidAttributeMappings, setOpenidAttributeMappings ] = useState<ClaimDialect[]>([]);
const [ xmlsoapAttributeMappings, setXmlsoapAttributeMappings ] = useState<ClaimDialect[]>([]);
const [ otherAttributeMappings, setOtherAttributeMappings ] = useState<ClaimDialect[]>([]);

const allowedScopes: string = useSelector((state: AppState) => state?.auth?.allowedScopes);
Expand Down Expand Up @@ -115,15 +114,16 @@ const ClaimDialectsPage: FunctionComponent<ClaimDialectsPageInterface> = (
);
}

return claim.id !== "local";
// Filter xml soap dialect and local attribute dialect.
return claim.id !== "local" &&
claim.id !== ClaimManagementConstants.ATTRIBUTE_DIALECT_IDS.get("XML_SOAP");
});

const oidc: ClaimDialect[] = [];
const scim: ClaimDialect[] = [];
const axschema: ClaimDialect[] = [];
const eidas: ClaimDialect[] = [];
const openid: ClaimDialect[] =[];
const xmlsoap: ClaimDialect[] = [];
const others: ClaimDialect[] = [];

filteredDialect.forEach((attributeMapping: ClaimDialect) => {
Expand All @@ -139,8 +139,6 @@ const ClaimDialectsPage: FunctionComponent<ClaimDialectsPageInterface> = (
eidas.push(attributeMapping);
} else if (ClaimManagementConstants.OPENID_MAPPING === attributeMapping.dialectURI) {
openid.push(attributeMapping);
} else if (ClaimManagementConstants.XMLSOAP_MAPPING === attributeMapping.dialectURI) {
xmlsoap.push(attributeMapping);
} else {
if (attributeConfig.showCustomDialectInSCIM) {
if (attributeMapping.dialectURI !== attributeConfig.localAttributes.customDialectURI) {
Expand All @@ -157,7 +155,6 @@ const ClaimDialectsPage: FunctionComponent<ClaimDialectsPageInterface> = (
setAxschemaAttributeMappings(axschema);
setEidasAttributeMappings(eidas);
setOpenidAttributeMappings(openid);
setXmlsoapAttributeMappings(xmlsoap);
setOtherAttributeMappings(others);
})
.catch((error: IdentityAppsApiException) => {
Expand Down Expand Up @@ -788,92 +785,6 @@ const ClaimDialectsPage: FunctionComponent<ClaimDialectsPageInterface> = (
)
)
}
{
isLoading
? (
renderSegmentPlaceholder()
) : (
xmlsoapAttributeMappings?.length > 0 && (
<EmphasizedSegment
className="clickable"
data-testid={ `${ testId }-xmlsoap-dialect-container` }
>
<List>
<List.Item
onClick={ () => {
history.push(
AppConstants.getPaths()
.get("ATTRIBUTE_MAPPINGS")
.replace(":type", ClaimManagementConstants.XMLSOAP)
);
} }
>
<Grid>
<Grid.Row columns={ 2 }>
<Grid.Column width={ 12 }>
<GenericIcon
transparent
verticalAlign="middle"
rounded
icon={ getTechnologyLogos().xmlsoap }
spaced="right"
size="mini"
floated="left"
/>
<List.Header>
{ t(
"console:manage.features." +
"claims.attributeMappings." +
"xmlsoap.heading"
) }
</List.Header>
<List.Description
data-testid={ `${ testId }-local-dialect` }
>
{ t(
"console:manage.features." +
"claims.attributeMappings." +
"xmlsoap.description"
) }
</List.Description>
</Grid.Column>
<Grid.Column
width={ 4 }
verticalAlign="middle"
textAlign="right"
>
<Popup
content={
hasRequiredScopes(
featureConfig?.attributeDialects,
featureConfig?.
attributeDialects?.scopes?.create,
allowedScopes
) ?
t("common:edit") :
t("common:view")
}
trigger={
hasRequiredScopes(
featureConfig?.attributeDialects,
featureConfig?.
attributeDialects?.scopes?.create,
allowedScopes
) ?
<Icon color="grey" name="pencil" /> :
<Icon color="grey" name="eye" />
}
inverted
/>
</Grid.Column>
</Grid.Row>
</Grid>
</List.Item>
</List>
</EmphasizedSegment>
)
)
}
{
!attributeConfig.showCustomDialectInSCIM && (
isLoading
Expand Down
2 changes: 0 additions & 2 deletions apps/console/src/features/claims/utils/resolve-type.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export const resolveType = (attributeType: string, capitalize?: boolean, shortFo
return "eIDAS";
case ClaimManagementConstants.OPENID:
return "OpenID";
case ClaimManagementConstants.XMLSOAP:
return "XML SOAP";
default:
return capitalize ? "Custom" : "custom";
}
Expand Down
7 changes: 2 additions & 5 deletions apps/console/src/features/core/configs/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ import OIDCLogo from "../../../themes/default/assets/images/protocols/openid-con
import OpenidLogo from "../../../themes/default/assets/images/protocols/openid.png";
import SamlLogo from "../../../themes/default/assets/images/protocols/saml.png";
import SCIMLogo from "../../../themes/default/assets/images/protocols/scim.png";
import XMLSOAPLogo from "../../../themes/default/assets/images/protocols/xmlsoap.png";
import { ReactComponent as AndroidLogo } from "../../../themes/default/assets/images/technologies/android-logo.svg";
import { ReactComponent as AngularLogo } from "../../../themes/default/assets/images/technologies/angular-logo.svg";
import { ReactComponent as AppleLogo } from "../../../themes/default/assets/images/technologies/apple-logo.svg";
Expand Down Expand Up @@ -193,8 +192,7 @@ interface GetTechnologyLogosInterface {
saml: string,
scim: string,
vue: FunctionComponent | ReactNode,
windows: FunctionComponent | ReactNode,
xmlsoap: string
windows: FunctionComponent | ReactNode
}

/**
Expand Down Expand Up @@ -227,8 +225,7 @@ export const getTechnologyLogos = (): GetTechnologyLogosInterface => {
saml: SamlLogo,
scim: SCIMLogo,
vue: VueLogo,
windows: WindowsLogo,
xmlsoap: XMLSOAPLogo
windows: WindowsLogo
};
};

Expand Down
4 changes: 0 additions & 4 deletions modules/i18n/src/models/namespaces/console-ns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3705,10 +3705,6 @@ export interface ConsoleNS {
heading: string;
description: string;
};
xmlsoap: {
heading: string;
description: string;
},
};
dialects: {
advancedSearch: {
Expand Down
4 changes: 0 additions & 4 deletions modules/i18n/src/translations/en-US/portals/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7168,10 +7168,6 @@ export const console: ConsoleNS = {
description: "The SCIM2 protocol representation for user "
+ "attributes that will be used in the SCIM2 API.",
heading: "SCIM 2.0"
},
xmlsoap: {
description: "The XML SOAP protocol representation for user attributes.",
heading: "XML SOAP"
}
},
dialects: {
Expand Down
4 changes: 0 additions & 4 deletions modules/i18n/src/translations/fr-FR/portals/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5596,10 +5596,6 @@ export const console: ConsoleNS = {
description: "Représentation du protocole SCIM2 pour les attributs " +
"utilisateur qui seront utilisés dans l'API SCIM2.",
heading: "System for Cross-Domain Identity Management"
},
xmlsoap: {
description: "Représentation du protocole XML SOAP pour les attributs utilisateur.",
heading: "XML SOAP"
}
},
dialects: {
Expand Down
4 changes: 0 additions & 4 deletions modules/i18n/src/translations/si-LK/portals/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5458,10 +5458,6 @@ export const console: ConsoleNS = {
scim: {
description: "SCIM2 API හි භාවිතා වන පරිශීලක ගුණාංග සඳහා වන SCIM2 ප්‍රොටොකෝලය නිරූපණය.",
heading: "System for Cross-Domain Identity Management"
},
xmlsoap: {
description: "පරිශීලක ගුණාංග සඳහා XML SOAP ප්‍රොටෝකෝල නිරූපණය.",
heading: "XML SOAP"
}
},
dialects: {
Expand Down
Binary file not shown.
Binary file not shown.
Loading