Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix serialization of raw deltas (MID-6086)
1. CryptoUtil methods no longer fail on tunneled SchemaExceptions from the depths of prism-impl. 2. parseRealValue now correctly parses ObjectReferenceType objects (no longed using BeanUnmarshaller for their parsing) 3. Prism visitor now visits also objects embedded in reference values. 4. JaxbVisitor in RawType visits the value after being parsed. Fix #2 resolves MID-6086. Fixes #3 and #4 are necessary to correctly encrypt passwords in ShadowType objects embedded in linkRef references.
- Loading branch information
Showing
14 changed files
with
233 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
infra/common/src/test/resources/crypto/task-add-account.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
~ Copyright (c) 2020 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<task xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" | ||
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" | ||
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" | ||
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" oid="a66d6763-eced-47b7-b57d-7bf6be27dcdb" version="5"> | ||
<name>Execute changes</name> | ||
<extension xmlns:mext="http://midpoint.evolveum.com/xml/ns/public/model/extension-3"> | ||
<mext:objectDeltas> | ||
<t:changeType>modify</t:changeType> | ||
<t:objectType>c:UserType</t:objectType> | ||
<t:oid>07cc8c14-f94a-4da9-86ab-0246fc63bb6b</t:oid> | ||
<t:itemDelta> | ||
<t:modificationType>add</t:modificationType> | ||
<t:path xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">c:linkRef</t:path> | ||
<t:value xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="c:ShadowType" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xsi:type="c:ObjectReferenceType"> | ||
<object> | ||
<c:resourceRef oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3fafe" type="c:ResourceType"/> | ||
<c:objectClass>ri:AccountObjectClass</c:objectClass> | ||
<c:kind>account</c:kind> | ||
<c:intent>default</c:intent> | ||
<c:attributes> | ||
<icfs:password xsi:type="t:ProtectedStringType">pass1234word</icfs:password> | ||
</c:attributes> | ||
</object> | ||
</t:value> | ||
</t:itemDelta> | ||
</mext:objectDeltas> | ||
<mext:executeOptions> | ||
<force>false</force> | ||
<reconcile>false</reconcile> | ||
<executeImmediatelyAfterApproval>false</executeImmediatelyAfterApproval> | ||
</mext:executeOptions> | ||
</extension> | ||
<taskIdentifier>1585065525794-0-1</taskIdentifier> | ||
<ownerRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType"> | ||
<!-- administrator --> | ||
</ownerRef> | ||
<channel>http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user</channel> | ||
<executionStatus>closed</executionStatus> | ||
<category>Utility</category> | ||
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/execute-deltas/handler-3</handlerUri> | ||
<recurrence>single</recurrence> | ||
<binding>tight</binding> | ||
</task> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.