This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove password from rego policy descriptions and Makefile
- Loading branch information
1 parent
9779a21
commit 911f6b2
Showing
10 changed files
with
29 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,14 +204,9 @@ impl Policy { | |
pub async fn evaluate_register( | ||
&mut self, | ||
username: &str, | ||
password: &str, | ||
email: &str, | ||
) -> Result<EvaluationResult, EvaluationError> { | ||
let input = RegisterInput::Password { | ||
username, | ||
password, | ||
email, | ||
}; | ||
let input = RegisterInput::Password { username, email }; | ||
|
||
let [res]: [EvaluationResult; 1] = self | ||
.instance | ||
|
@@ -404,19 +399,19 @@ mod tests { | |
let mut policy = factory.instantiate().await.unwrap(); | ||
|
||
let res = policy | ||
.evaluate_register("hello", "hunter2", "[email protected]") | ||
.evaluate_register("hello", "[email protected]") | ||
.await | ||
.unwrap(); | ||
assert!(!res.valid()); | ||
|
||
let res = policy | ||
.evaluate_register("hello", "hunter2", "[email protected]") | ||
.evaluate_register("hello", "[email protected]") | ||
.await | ||
.unwrap(); | ||
assert!(res.valid()); | ||
|
||
let res = policy | ||
.evaluate_register("hello", "hunter2", "[email protected]") | ||
.evaluate_register("hello", "[email protected]") | ||
.await | ||
.unwrap(); | ||
assert!(!res.valid()); | ||
|
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ package register | |
mock_registration := { | ||
"registration_method": "password", | ||
"username": "hello", | ||
"password": "Hunter2", | ||
"email": "[email protected]", | ||
} | ||
|
||
|
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