-
Notifications
You must be signed in to change notification settings - Fork 621
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
krb5 #1706
Draft
nichtsfrei
wants to merge
16
commits into
main
Choose a base branch
from
krb5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
krb5 #1706
Conversation
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
github-actions
bot
added
patch_release
creates a patch release
and removed
patch_release
creates a patch release
labels
Oct 2, 2024
github-actions
bot
added
patch_release
creates a patch release
and removed
patch_release
creates a patch release
labels
Oct 3, 2024
github-actions
bot
added
patch_release
creates a patch release
and removed
patch_release
creates a patch release
labels
Oct 3, 2024
This commit introduces the initial proposal for integrating Kerberos authentication across: - openvas - scannerctl - openvasd The goal is to provide a common header and implementation that can be shared among these components. The proposed common header will define the following NASL functions: 1. `krb5_authenticate(realm, kdc, user, password)` - All parameters are optional, with `realm`, `user`, and `password` ideally set via OSP/HTTP credentials. However, for testing purposes, these parameters can be provided programmatically. - Returns an identifier for the internally stored element or a negative value on failure. 2. `krb5_end_time(connection)` - Returns the `end_time` of the given connection. While this is typically handled internally, it is exposed for debugging purposes. 3. `krb5_start_time(connection)` - Returns the `start_time` of the given connection, primarily for debugging purposes. 4. `krb5_renew_till(connection)` - Returns the `renew_till` value of the given connection, also for debugging purposes. 5. `krb5_create_request(connection, data)` - Creates a Kerberos request based on the connection and provided data. Returns the request data or `NULL` on error. 6. `krb5_error(connection)` - Returns `NULL` if there is no error, otherwise an error string. This is useful for debugging and forces the underlying implementation to track connection errors. This proposal is the foundation for implementing consistent Kerberos authentication across various components while offering debugging and testing flexibility.
For easier handling a cache implementation is added. This allows us to reuse tickets when they are available.
To not have to deal with cmake the implementation of krb5 moved from kerberos to misc. Additionally the bindings to add it into openvas are created.
This allows to authenticate against a kdc as well as creating data to send to and from the target.
Adds new nasl functions: - krb5_gss_session_key: to extract the session key - krb5_error_code_to_string: to translate the stored error code into a string. Usage: ``` sk = krb5_gss_session_key(); display("Error code: " + krb5_error_code_to_string()); ```
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files |
github-actions
bot
added
minor_release
creates a minor release
and removed
patch_release
creates a patch release
labels
Oct 24, 2024
As long as krb5_gss_update_context_needs_more send the krb5 data to the target and update the context with the result of that.
github-actions
bot
added
minor_release
creates a minor release
and removed
minor_release
creates a minor release
labels
Nov 4, 2024
When creating the credentials nasl_krb5 checks if the provided realm is configured within the provided krb5.conf. If not it adds the provided kdc to the realm within krb5.conf. Additionally this commit fixes the error handling by first setting msg_ctx to 0.
Since we made the decision to rather use GSS instead of KRB5 directly and accepting that we lose controll in favor of convencience.
github-actions
bot
added
minor_release
creates a minor release
and removed
minor_release
creates a minor release
labels
Nov 6, 2024
Reduce cognitive load by using a macro for testing maj stat within `orkb5_gss_authenticate`, Free user_principal as it is not needed after the authentication is done.
In krb5_gss_update_context the data len was retrived by using strlen, this is incorrect as the data is not a str, although the name indicates it, but is actually a pointer to raw data and therefore `get_var_size_by_num` must be used instead. The freeing method `okrb5_gss_free_context` did not release gss specific data this is changed.
github-actions
bot
added
minor_release
creates a minor release
and removed
minor_release
creates a minor release
labels
Nov 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds krb5 functionality to NASL by utilizing GSSAPI of MIT KRB5.
Missing:
[ ] Automated REALM handling
[ ] Human readable error messages
[ ] OSP adaptation
[ ] OpenVASD integration