Skip to content

Commit

Permalink
refactor: move password config to selfservice
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The following configuration keys were updated:

```patch
selfservice.methods.password.config.max_breaches
```
- `password.max_breaches` -> `selfservice.methods.password.config.max_breaches`
- `password.ignore_network_errors` -> `selfservice.methods.password.config.ignore_network_errors`
  • Loading branch information
aeneasr committed Jan 13, 2021
1 parent 4097e27 commit cd0e0eb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
44 changes: 22 additions & 22 deletions .schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,28 @@
"type": "boolean",
"title": "Enables Username/Email and Password Method",
"default": true
},
"config": {
"type": "object",
"title": "Password Configuration",
"description": "Define how passwords are validated.",
"properties": {
"max_breaches": {
"title": "Allow Password Breaches",
"description": "Defines how often a password may have been breached before it is rejected.",
"type": "integer",
"minimum": 0,
"maximum": 100,
"default": 0
},
"ignore_network_errors": {
"title": "Ignore Lookup Network Errors",
"description": "If set to false the password validation fails when the network or the Have I Been Pwnd API is down.",
"type": "boolean",
"default": true
}
},
"additionalProperties": false
}
}
},
Expand Down Expand Up @@ -1020,28 +1042,6 @@
],
"additionalProperties": false
},
"password": {
"type": "object",
"title": "Password Configuration",
"description": "Define how passwords are validated.",
"properties": {
"max_breaches": {
"title": "Allow Password Breaches",
"description": "Defines how often a password may have been breached before it is rejected.",
"type": "integer",
"minimum": 0,
"maximum": 100,
"default": 0
},
"ignore_network_errors": {
"title": "Ignore Lookup Network Errors",
"description": "If set to false the password validation fails when the network or the Have I Been Pwnd API is down.",
"type": "boolean",
"default": true
}
},
"additionalProperties": false
},
"secrets": {
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions driver/config/provider_viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ const (
ViperKeyHasherArgon2ConfigParallelism = "hashers.argon2.parallelism"
ViperKeyHasherArgon2ConfigSaltLength = "hashers.argon2.salt_length"
ViperKeyHasherArgon2ConfigKeyLength = "hashers.argon2.key_length"
ViperKeyPasswordMaxBreaches = "password.max_breaches"
ViperKeyIgnoreNetworkErrors = "password.ignore_network_errors"
ViperKeyPasswordMaxBreaches = "selfservice.methods.password.config.max_breaches"
ViperKeyIgnoreNetworkErrors = "selfservice.methods.password.config.ignore_network_errors"
ViperKeyVersion = "version"
Argon2DefaultMemory uint32 = 4 * 1024 * 1024
Argon2DefaultIterations uint32 = 4
Expand Down

0 comments on commit cd0e0eb

Please sign in to comment.