-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support GSS encrypt request decoding as part of psql 14.15 client (#1361
- Loading branch information
Showing
9 changed files
with
315 additions
and
5 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
.../io/aklivity/zilla/specs/binding/pgsql/streams/application/gss.encrypt.request/client.rpt
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,31 @@ | ||
# | ||
# Copyright 2021-2024 Aklivity Inc | ||
# | ||
# Licensed under the Aklivity Community License (the "License"); you may not use | ||
# this file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# https://www.aklivity.io/aklivity-community-license/ | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
connect "zilla://streams/app0" | ||
option zilla:window 8192 | ||
option zilla:transmission "duplex" | ||
|
||
write zilla:begin.ext ${pgsql:beginEx() | ||
.typeId(zilla:id("pgsql")) | ||
.parameter("user", "root") | ||
.parameter("database", "dev") | ||
.parameter("application_name", "psql") | ||
.parameter("client_encoding", "UTF8") | ||
.build()} | ||
|
||
connected | ||
|
||
read closed | ||
write close |
35 changes: 35 additions & 0 deletions
35
.../io/aklivity/zilla/specs/binding/pgsql/streams/application/gss.encrypt.request/server.rpt
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,35 @@ | ||
# | ||
# Copyright 2021-2024 Aklivity Inc | ||
# | ||
# Licensed under the Aklivity Community License (the "License"); you may not use | ||
# this file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# https://www.aklivity.io/aklivity-community-license/ | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
property serverAddress "zilla://streams/app0" | ||
|
||
accept ${serverAddress} | ||
option zilla:window 8192 | ||
option zilla:transmission "duplex" | ||
|
||
accepted | ||
|
||
read zilla:begin.ext ${pgsql:beginEx() | ||
.typeId(zilla:id("pgsql")) | ||
.parameter("user", "root") | ||
.parameter("database", "dev") | ||
.parameter("application_name", "psql") | ||
.parameter("client_encoding", "UTF8") | ||
.build()} | ||
|
||
connected | ||
|
||
write close | ||
read closed |
85 changes: 85 additions & 0 deletions
85
...ipts/io/aklivity/zilla/specs/binding/pgsql/streams/network/gss.encrypt.request/client.rpt
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,85 @@ | ||
# | ||
# Copyright 2021-2024 Aklivity Inc | ||
# | ||
# Licensed under the Aklivity Community License (the "License"); you may not use | ||
# this file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# https://www.aklivity.io/aklivity-community-license/ | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
property networkConnectWindow 8192 | ||
|
||
connect "zilla://streams/net0" | ||
option zilla:window ${networkConnectWindow} | ||
option zilla:transmission "duplex" | ||
option zilla:byteorder "network" | ||
|
||
connected | ||
|
||
write 8 # length | ||
[0x04 0xd2 0x16 0x30] # gss encrypt request code | ||
|
||
read [0x4e] | ||
|
||
write 8 # length | ||
[0x04 0xd2 0x16 0x2f] # ssl request code | ||
|
||
read [0x4e] | ||
|
||
write 75 # length | ||
3s # major version | ||
0s # minor version | ||
"user" [0x00] # name | ||
"root" [0x00] # value | ||
"database" [0x00] # name | ||
"dev" [0x00] # value | ||
"application_name" [0x00] # name | ||
"psql" [0x00] # value | ||
"client_encoding" [0x00] # name | ||
"UTF8" [0x00] # value | ||
[0x00] # end of parameters | ||
|
||
read [0x52] # type R | ||
8 # length | ||
0 # authentication type | ||
|
||
read [0x4b] # type K | ||
12 # length | ||
0 # pid | ||
0 # key | ||
|
||
read [0x53] # type S | ||
25 # length | ||
"client_encoding" [0x00] # name | ||
"UTF8" [0x00] # value | ||
|
||
read [0x53] # type S | ||
35 # length | ||
"standard_conforming_strings" [0x00] # name | ||
[0x6f 0x6e 0x00] # value | ||
|
||
read [0x53] # type S | ||
25 # length | ||
"server_version" [0x00] # name | ||
"9.1.0" [0x00] # value | ||
|
||
read [0x53] # type S | ||
27 # length | ||
"application_name" [0x00] # name | ||
"zilla" [0x00] # value | ||
|
||
read [0x5a] # type Z | ||
5 # length | ||
[0x49] # status | ||
|
||
read [0x58] # type X | ||
4 # length | ||
|
||
read closed | ||
write close |
87 changes: 87 additions & 0 deletions
87
...ipts/io/aklivity/zilla/specs/binding/pgsql/streams/network/gss.encrypt.request/server.rpt
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,87 @@ | ||
# | ||
# Copyright 2021-2024 Aklivity Inc | ||
# | ||
# Licensed under the Aklivity Community License (the "License"); you may not use | ||
# this file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# https://www.aklivity.io/aklivity-community-license/ | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
property networkAcceptWindow 8192 | ||
|
||
accept "zilla://streams/net0" | ||
option zilla:window ${networkAcceptWindow} | ||
option zilla:transmission "duplex" | ||
option zilla:byteorder "network" | ||
|
||
accepted | ||
|
||
connected | ||
|
||
read 8 # length | ||
[0x04 0xd2 0x16 0x30] # gss encrypt request code | ||
|
||
write [0x4e] | ||
|
||
read 8 # length | ||
[0x04 0xd2 0x16 0x2f] # ssl request code | ||
|
||
write [0x4e] | ||
|
||
read 75 # length | ||
3s # major version | ||
0s # minor version | ||
"user" [0x00] # name | ||
"root" [0x00] # value | ||
"database" [0x00] # name | ||
"dev" [0x00] # value | ||
"application_name" [0x00] # name | ||
"psql" [0x00] # value | ||
"client_encoding" [0x00] # name | ||
"UTF8" [0x00] # value | ||
[0x00] # end of parameters | ||
|
||
write [0x52] # type R | ||
8 # length | ||
0 # authentication type | ||
|
||
write [0x4b] # type K | ||
12 # length | ||
0 # pid | ||
0 # key | ||
|
||
write [0x53] # type S | ||
25 # length | ||
"client_encoding" [0x00] # name | ||
"UTF8" [0x00] # value | ||
|
||
write [0x53] # type S | ||
35 # length | ||
"standard_conforming_strings" [0x00] # name | ||
[0x6f 0x6e 0x00] # value | ||
|
||
write [0x53] # type S | ||
25 # length | ||
"server_version" [0x00] # name | ||
"9.1.0" [0x00] # value | ||
|
||
write [0x53] # type S | ||
27 # length | ||
"application_name" [0x00] # name | ||
"zilla" [0x00] # value | ||
|
||
write [0x5a] # type Z | ||
5 # length | ||
[0x49] # status | ||
|
||
write [0x58] # type X | ||
4 # length | ||
|
||
write close | ||
read closed |
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
Oops, something went wrong.