-
Notifications
You must be signed in to change notification settings - Fork 2
Restrict agent signing path #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
protocol/src/main/resources/kaitai/restrict_destination_constraint.ksy
This file contains hidden or 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,44 @@ | ||
| meta: | ||
| id: restrict_destination_constraint | ||
| title: restrict-destination-v00@openssh.com Constraint | ||
| endian: be | ||
| imports: | ||
| - byte_string | ||
| doc: | | ||
| One hop entry for the restrict-destination-v00@openssh.com agent key constraint. | ||
| from_hostname and from_keyspecs are empty for origin-side constraints. | ||
| seq: | ||
| - id: from_hostname | ||
| type: byte_string | ||
| doc: Hostname of the previous hop (empty for origin) | ||
| - id: num_from_keyspecs | ||
| type: u4 | ||
| doc: Number of from host key specs | ||
| - id: from_keyspecs | ||
| type: keyspec | ||
| repeat: expr | ||
| repeat-expr: num_from_keyspecs | ||
| doc: Host key specs for the previous hop (empty for origin) | ||
| - id: to_username | ||
| type: byte_string | ||
| doc: Destination username (empty = any user) | ||
| - id: to_hostname | ||
| type: byte_string | ||
| doc: Destination hostname | ||
| - id: num_to_hostspecs | ||
| type: u4 | ||
| doc: Number of destination host key specs | ||
| - id: to_hostspecs | ||
| type: keyspec | ||
| repeat: expr | ||
| repeat-expr: num_to_hostspecs | ||
| doc: Destination host key specs | ||
| types: | ||
| keyspec: | ||
| seq: | ||
| - id: keyblob | ||
| type: byte_string | ||
| doc: Host key blob | ||
| - id: is_ca | ||
| type: u1 | ||
| doc: 1 if this is a CA key, 0 if it is a direct host key |
This file contains hidden or 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
40 changes: 40 additions & 0 deletions
40
protocol/src/main/resources/kaitai/userauth_publickey_hostbound_signature_data.ksy
This file contains hidden or 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,40 @@ | ||
| meta: | ||
| id: userauth_publickey_hostbound_signature_data | ||
| endian: be | ||
| imports: | ||
| - byte_string | ||
| doc-ref: OpenSSH publickey-hostbound-v00@openssh.com extension | ||
| doc: > | ||
| The data over which the signature is computed for publickey-hostbound authentication. | ||
| Identical to userauth_publickey_signature_data but method_name is | ||
| "publickey-hostbound-v00@openssh.com" and server_host_key is appended. | ||
| seq: | ||
| - id: session_identifier | ||
| type: byte_string | ||
| doc: Session identifier from key exchange | ||
| - id: message_type | ||
| contents: | ||
| - 50 | ||
| doc: SSH_MSG_USERAUTH_REQUEST (50) | ||
| - id: user_name | ||
| type: byte_string | ||
| doc: User name | ||
| - id: service_name | ||
| type: byte_string | ||
| doc: Service name | ||
| - id: method_name | ||
| type: byte_string | ||
| doc: Authentication method name ("publickey-hostbound-v00@openssh.com") | ||
| - id: has_signature | ||
| contents: | ||
| - 1 | ||
| doc: TRUE (1) | ||
| - id: public_key_algorithm_name | ||
| type: byte_string | ||
| doc: Public key algorithm name | ||
| - id: public_key_blob | ||
| type: byte_string | ||
| doc: Public key to be used for authentication | ||
| - id: server_host_key | ||
| type: byte_string | ||
| doc: Server's host key, binding the signature to the intended destination |
40 changes: 40 additions & 0 deletions
40
protocol/src/main/resources/kaitai/userauth_publickey_signature_data_any.ksy
This file contains hidden or 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,40 @@ | ||
| meta: | ||
| id: userauth_publickey_signature_data_any | ||
| endian: be | ||
| imports: | ||
| - byte_string | ||
| - ascii_string | ||
| - utf8_string | ||
| doc: > | ||
| The data over which the signature is computed for publickey authentication. | ||
| This handles both the standard RFC 4252 version and the OpenSSH | ||
| publickey-hostbound-v00@openssh.com extension. | ||
| seq: | ||
| - id: session_identifier | ||
| type: byte_string | ||
| doc: Session identifier from key exchange | ||
| - id: message_type | ||
| contents: [50] | ||
| doc: SSH_MSG_USERAUTH_REQUEST (50) | ||
| - id: user_name | ||
| type: utf8_string | ||
| doc: User name | ||
| - id: service_name | ||
| type: ascii_string | ||
| doc: Service name | ||
| - id: method_name | ||
| type: ascii_string | ||
| doc: Authentication method name | ||
| - id: has_signature | ||
| contents: [1] | ||
| doc: TRUE (1) | ||
| - id: public_key_algorithm_name | ||
| type: ascii_string | ||
| doc: Public key algorithm name | ||
| - id: public_key_blob | ||
| type: byte_string | ||
| doc: Public key to be used for authentication | ||
| - id: server_host_key | ||
| type: byte_string | ||
| doc: Server's host key, binding the signature to the intended destination (only for hostbound method) | ||
| if: method_name.value == "publickey-hostbound-v00@openssh.com" |
31 changes: 31 additions & 0 deletions
31
protocol/src/main/resources/kaitai/userauth_request_publickey_hostbound.ksy
This file contains hidden or 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 @@ | ||
| meta: | ||
| id: userauth_request_publickey_hostbound | ||
| endian: be | ||
| imports: | ||
| - ascii_string | ||
| - byte_string | ||
| doc-ref: OpenSSH publickey-hostbound-v00@openssh.com extension | ||
| doc: > | ||
| Publickey authentication method fields for publickey-hostbound-v00@openssh.com. | ||
| Identical to userauth_request_publickey but adds server_host_key before signature. | ||
| seq: | ||
| - id: has_signature | ||
| type: u1 | ||
| doc: > | ||
| FALSE (0) to query if the public key is acceptable for authentication. | ||
| TRUE (1) to perform actual authentication with signature. | ||
| - id: public_key_algorithm_name | ||
| type: ascii_string | ||
| doc: Public key algorithm name | ||
| - id: public_key_blob | ||
| type: byte_string | ||
| doc: Public key blob (may contain certificates) | ||
| - id: server_host_key | ||
| type: byte_string | ||
| doc: Server's host key blob, binding the authentication to a specific destination | ||
| - id: signature | ||
| type: byte_string | ||
| doc: > | ||
| Signature over session identifier and authentication request including server host key. | ||
| Only present when has_signature is TRUE. | ||
| if: has_signature != 0 |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.