-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-18168: Add Kafka payload and config to support changing user pas…
…sword (#1356) Creates -ChangeUserPasswordOtherRequest.avsc -ChangeUserPasswordSelfRequest.avsc These will be used to allow users to change their own password, and for an admin to change a particular user's password. This also adds new config settings related to password expiry, specifically, default values for how long a password should last before expiring depending on whether a user or an admin changed the password.
- Loading branch information
1 parent
3c09b7b
commit 77ff03a
Showing
5 changed files
with
103 additions
and
0 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
34 changes: 34 additions & 0 deletions
34
...urces/avro/net/corda/data/permissions/management/user/ChangeUserPasswordOtherRequest.avsc
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,34 @@ | ||
{ | ||
"type": "record", | ||
"name": "ChangeUserPasswordOtherRequest", | ||
"namespace": "net.corda.data.permissions.management.user", | ||
"fields": [ | ||
{ | ||
"name": "requestedBy", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "saltValue", | ||
"type": [ "null", "string" ] | ||
}, | ||
{ | ||
"name": "hashedNewPassword", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "passwordExpiry", | ||
"type": [ | ||
"null", | ||
{ | ||
"type": "long", | ||
"logicalType": "timestamp-millis" | ||
} | ||
], | ||
"doc": "Time ([Instant]) in milliseconds when the user's password expires." | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
...ources/avro/net/corda/data/permissions/management/user/ChangeUserPasswordSelfRequest.avsc
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,30 @@ | ||
{ | ||
"type": "record", | ||
"name": "ChangeUserPasswordSelfRequest", | ||
"namespace": "net.corda.data.permissions.management.user", | ||
"fields": [ | ||
{ | ||
"name": "requestedBy", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "saltValue", | ||
"type": [ "null", "string" ] | ||
}, | ||
{ | ||
"name": "hashedNewPassword", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "passwordExpiry", | ||
"type": [ | ||
"null", | ||
{ | ||
"type": "long", | ||
"logicalType": "timestamp-millis" | ||
} | ||
], | ||
"doc": "Time ([Instant]) in milliseconds when the user's password expires." | ||
} | ||
] | ||
} |
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
32 changes: 32 additions & 0 deletions
32
.../config-schema/src/main/resources/net/corda/schema/configuration/rbac.1.0/corda.rbac.json
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,32 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"$id": "https://corda.r3.com/net/corda/schema/configuration/rbac/1.0/corda.rbac.json", | ||
"title": "Corda RBAC Configuration Schema", | ||
"description": "Configuration schema for the Roll Based Access section.", | ||
"type": "object", | ||
"default": {}, | ||
"properties": { | ||
"password": { | ||
"description": "Settings for passwords.", | ||
"type": "object", | ||
"default": {}, | ||
"userPasswordChangeExpiry": { | ||
"description": "The amount of time (days) before the password must be updated again after user password change.", | ||
"type": "integer", | ||
"minimum": 30, | ||
"default": 90 | ||
}, | ||
"adminPasswordChangeExpiry": { | ||
"description": "The amount of time (days) before the password must be updated again after admin password change", | ||
"type": "integer", | ||
"minimum": 1, | ||
"default": 7 | ||
}, | ||
"passwordExpiryWarningWindow": { | ||
"description": "The time (days) before a password expires in which we begin to offer warnings about upcoming expiry.", | ||
"type": "integer", | ||
"default": 30 | ||
} | ||
} | ||
} | ||
} |