-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for basic, kerberos, custom, and sso auth (#237)
Co-authored-by: Florent Biville <[email protected]>
- Loading branch information
1 parent
21f7ec2
commit 1cdc9eb
Showing
130 changed files
with
950 additions
and
262 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
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
7 changes: 0 additions & 7 deletions
7
tests/stub/authorization/scripts/v3/reader_tx_yielding_auth_expired_on_begin.script
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_begin.script
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,7 @@ | ||
!: BOLT #VERSION# | ||
|
||
A: HELLO {"{}": "*"} | ||
*: RESET | ||
C: BEGIN {"mode": "r"} | ||
S: FAILURE #ERROR# | ||
<EXIT> |
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 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
7 changes: 0 additions & 7 deletions
7
tests/stub/authorization/scripts/v4x3/reader_tx_yielding_auth_expired_on_begin.script
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_begin.script
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,7 @@ | ||
!: BOLT #VERSION# | ||
|
||
A: HELLO {"{}": "*"} | ||
*: RESET | ||
C: BEGIN {"mode": "r", "db": "adb"} | ||
S: FAILURE #ERROR# | ||
S: <EXIT> |
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
3 changes: 2 additions & 1 deletion
3
...er_tx_yielding_auth_expired_on_run.script → ...x3/reader_tx_yielding_error_on_run.script
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
!: BOLT #VERSION# | ||
|
||
A: HELLO {"{}": "*"} | ||
*: RESET | ||
C: BEGIN {"mode": "r", "db": "adb"} | ||
S: SUCCESS {} | ||
C: RUN "RETURN 1 as n" {} {} | ||
S: FAILURE {"code": "Neo.ClientError.Security.AuthorizationExpired", "message": "Authorization expired"} | ||
S: FAILURE #ERROR# | ||
<EXIT> |
3 changes: 2 additions & 1 deletion
3
...ader_yielding_auth_expired_on_pull.script → ...v4x3/reader_yielding_error_on_pull.script
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
!: BOLT #VERSION# | ||
|
||
A: HELLO {"{}": "*"} | ||
*: RESET | ||
C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL {"n": 1000} | ||
S: FAILURE {"code": "Neo.ClientError.Security.AuthorizationExpired", "message": "Authorization expired"} | ||
S: FAILURE #ERROR# | ||
<EXIT> |
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[routing]": null, "[realm]": ""} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_basic_minimal.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass"} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_basic_realm_foobar.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar", "[routing]": null} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_basic_realm_foobar_minimal.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar"} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_bearer.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "bearer", "credentials": "QmFuYW5hIQ==", "[principal]": "", "[routing]": null, "[realm]": ""} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_bearer_minimal.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "bearer", "credentials": "QmFuYW5hIQ=="} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_custom.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}, "[routing]": null} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_custom_empty.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "minimal-scheme", "principal": "", "[credentials]": "", "[realm]": "", "[parameters]": {}, "[routing]": null} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
14 changes: 14 additions & 0 deletions
14
tests/stub/authorization/scripts/v4x3/scheme_custom_empty_minimal.script
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,14 @@ | ||
!: BOLT 4.3 | ||
|
||
# Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. | ||
A: HELLO {"user_agent": "*", "scheme": "minimal-scheme", "principal": ""} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
13 changes: 13 additions & 0 deletions
13
tests/stub/authorization/scripts/v4x3/scheme_custom_minimal.script
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,13 @@ | ||
!: BOLT 4.3 | ||
|
||
A: HELLO {"user_agent": "*", "scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
14 changes: 14 additions & 0 deletions
14
tests/stub/authorization/scripts/v4x3/scheme_kerberos.script
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,14 @@ | ||
!: BOLT 4.3 | ||
|
||
# Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. | ||
A: HELLO {"user_agent": "*", "scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ==", "[routing]": null, "[realm]": ""} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
14 changes: 14 additions & 0 deletions
14
tests/stub/authorization/scripts/v4x3/scheme_kerberos_minimal.script
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,14 @@ | ||
!: BOLT 4.3 | ||
|
||
# Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. | ||
A: HELLO {"user_agent": "*", "scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ=="} | ||
*: RESET | ||
|
||
C: RUN "RETURN 1 AS n" "*" "*" | ||
S: SUCCESS {"fields": ["n"]} | ||
C: PULL "*" | ||
S: RECORD [1] | ||
SUCCESS {"type": "r"} | ||
|
||
*: RESET | ||
?: GOODBYE |
Oops, something went wrong.