-
Notifications
You must be signed in to change notification settings - Fork 47
add code for kerberos strategy with user token as input(straight) & m… #299
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
add code for kerberos strategy with user token as input(straight) & m… #299
Conversation
…odify CMakeList.txt to compile with 4221 warning
bretambrose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some fundamental type mismatches (casting to chain) that have led to some messy consequences such that I haven't looked at the ntlm stuff much. Let's fix those and then simplify/rework all of the state logic and then I'll take a look again.
| (void)num_headers; | ||
|
|
||
| /* SA-TBI: process CONNECT response headers here if needed */ | ||
| //transfer the challenge to user area only when connect state in progress & sub state is not in progress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this state logic at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added documentation/explanation in code
| * User-supplied transform callback function that gets user data depending on callback state | ||
| *(example NTLM credentials/response) | ||
| */ | ||
| typedef char* (*aws_http_proxy_get_user_data_callback_fn)(int callback_state, void *userdata); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need these callbacks to support async execution, as it is they can only be used synchronously. We'll want to pass the completion functions (terminate, continue) here as well and then it's the responsibilty of the callback implementer to invoke the right function when the data is ready.
| enum aws_http_proxy_connection_type proxy_connection_type; | ||
|
|
||
| /* user token to use in kerberos authentication which is base64 encoded and provided by user*/ | ||
| struct aws_byte_cursor user_token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to pass in an (async-ready) function that fetches the user token rather than the user token itself. As it stands, I don't think this would support long-term connections because eventually the token expires and there's no sensible way to get a refreshed one.
…fig while creating strategy
…add it thru config
…ction API to cleary state that both Kerberos & NTLM are being configured
…odify CMakeList.txt to compile with 4221 warning
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.