Skip to content

Commit 449e733

Browse files
committed
Update shadow fixup task design doc
1 parent cfb42e5 commit 449e733

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

docs/389ds/design/shadow-fixup-design.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ title: "Shadow Account Fix-up Task"
88
Overview
99
--------
1010

11-
When updating userPassword in RHDS, the shadowLastChange attribute is automatically generated. This behavior aligns with RFC 2307 and was implemented in [Shawdow Account Support](https://www.port389.org/docs/389ds/design/shadow-account-support.html). AIX systems validate the presence of **shadowLastChange** when both **shadowMin** and **shadowMax** are set, but in databases migrated from ODSEE if **shadowLastChange** is not present then AIX authentication fails. There needs to be a shadow account fix-up task so that after a database import **shadowlastChange" attribute can be added/updated. There is also an issue where shadowLastUpdate might have an incorrect value because it was manually set in ODSEE. So *shadowLastCahnge* could be missing or have a stale/incorrect value.
11+
When updating userPassword in RHDS, the shadowLastChange attribute is automatically generated. This behavior aligns with RFC 2307 and was implemented in [Shawdow Account Support](https://www.port389.org/docs/389ds/design/shadow-account-support.html). AIX systems validate the presence of **shadowLastChange** when both **shadowMin** and **shadowMax** are set, but in databases migrated from ODSEE if **shadowLastChange** is not present then AIX authentication fails. There needs to be a shadow account fix-up task so that after a database import the **shadowlastChange** attribute can be added/updated. There is also an issue where *shadowLastChange* might have an incorrect value because it was manually set. So *shadowLastChange* could be missing, or it could have a stale/incorrect value.
1212

1313
Design
1414
----------------------------------
1515

16-
The fixup task takes a suffix/subtree and searches for all entries that have objectclass **shadowAccount**. If the entry does not have **shadowLastChange** present, then it adds it. If the value is determined to be stale, or out-of-date, it regenerates the values based off of **passwordExpirationtime** operational attribute.
16+
The fixup task takes a suffix/subtree and searches for all entries that have objectclass **shadowAccount**. If the entry does not have **shadowLastChange** present, then it adds it. If the value is determined to be stale, or out-of-date, it regenerates the value based off of **passwordExpirationtime** operational attribute.
1717

18-
The way the value is determined to be *stale* is to look at *passwordExpirationtime* value, minus the password policy passwordMaxage value, and compare that to the current value of *shadowLastChnage*. If they are different then the task resets the value to: (passwordExpirationtime - maxAge) / SECONDS-PER-DAY ---> the **ShadowLastChange" value is the number of *days* since January 1, 1970 (epoch). So when we build out the value is needs to be in *days* not *seconds*.
18+
The way the value is determined to be *stale* is to look at *passwordExpirationtime* value, minus the password policy passwordMaxage value, convert it to days, and compare that to the current value of *shadowLastChange*. If they are different then the task resets the value to: (passwordExpirationtime - maxAge) / SECONDS-PER-DAY ---> the **ShadowLastChange" value is the number of *days* since January 1, 1970 (epoch). So when we build out the value it needs to be in *days* not *seconds*.
1919

20-
Implementation
20+
CLI Implementation
2121
--------------
2222

2323
```
@@ -44,6 +44,23 @@ Examples:
4444
4545
```
4646

47+
Task Entry
48+
-------------
49+
50+
The task is created under
51+
52+
cn=fixup shadow attributes,cn=tasks,cn=config
53+
54+
Task entry looks like
55+
56+
dn: cn=my fixup task,cn=fixup shadow attributes,cn=tasks,cn=config
57+
objectclass: top
58+
objectclass: extensibleObject
59+
cn: my fixup task
60+
suffix: ou=people,dc=example,dc=com
61+
force: off
62+
63+
4764
Origin
4865
-------------
4966

0 commit comments

Comments
 (0)