Skip to content
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

Exposing whether or not security should authenticate #24616

Closed
wants to merge 6 commits into from

Conversation

kobelb
Copy link
Contributor

@kobelb kobelb commented Oct 26, 2018

This will allow Canvas to determine whether or not they should be
authenticating their socket messages. Additionally, this consolidates
the logic to within the checkLicenseResultGenerator since we are making
this determination based on the xpack info and the license itself.

This will allow Canvas to determine whether or not they should be
authenticating their socket messages. Additionally, this consolidates
the logic to within the checkLicenseResultGenerator since we are making
this determination based on the xpack info and the license itself.
@kobelb kobelb requested a review from legrego October 26, 2018 00:53
@kobelb kobelb added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.0.0 labels Oct 26, 2018
@kobelb
Copy link
Contributor Author

kobelb commented Oct 26, 2018

/cc @cqliu1 @w33ble

@legrego
Copy link
Member

legrego commented Oct 26, 2018

Just out of curiosity, is this only targeted for 7.0, or is this also being backported to 6.x & 6.5?

@w33ble
Copy link
Contributor

w33ble commented Oct 26, 2018

6.x would be great. 6.5 would be nice, but isn't required.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@@ -27,6 +27,7 @@ export function checkLicense(xPackInfo) {
// assume worst-case and lock user at login screen.
if (!xPackInfo.isAvailable()) {
return {
authenticate: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your thoughts on naming this shouldAuthenticate? I'm not opposed to leaving it as-is, but shouldAuthenticate would match the name that we are exposing on the security plugin, and I feel it would be more consistent with the rest of the flags we are presenting in this license check response.

Other options: isAuthenticated / allowAuthentication (but this feels similar to allowLogin)

edit: If I'm reading this correctly, the authenticate flag value mirrors that of showLogin. Do you think it makes sense to consolidate these flags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching everything to use allowAuthentication from the license check results seems reasonable to me. I'm torn on whether or not we should expose server.plugins.security.allowAuthentication though or we should continue using server.plugins.security.shouldAuthenticate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion on allowAuthentication vs shouldAuthenticate as the exposed function. Whatever you choose there is fine with me

legrego and others added 2 commits October 29, 2018 16:40
Co-Authored-By: kobelb <brandon.kobel@gmail.com>
…thenticator.js

Co-Authored-By: kobelb <brandon.kobel@gmail.com>
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kobelb kobelb added the v6.6.0 label Nov 1, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@kobelb
Copy link
Contributor Author

kobelb commented Nov 8, 2018

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kobelb kobelb force-pushed the security-should-authenticate branch from f48f5f8 to 9d0f506 Compare November 8, 2018 18:44
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kobelb
Copy link
Contributor Author

kobelb commented Feb 13, 2019

@cqliu1 @w33ble apologies for losing track of this PR, is this still something you all would benefit from?

@elasticmachine
Copy link
Contributor

💔 Build Failed

@w33ble
Copy link
Contributor

w33ble commented Feb 14, 2019

@kobelb I think so. There's code in Canvas to do this already, but it would be nice if it was moved into Security instead. I don't know what this PR was waiting on either, maybe just a review label and some assignees?

@kobelb
Copy link
Contributor Author

kobelb commented Feb 14, 2019

I don't know what this PR was waiting on either, maybe just a review label and some assignees?

I think it was just waiting on me not forgetting about it, I'll get it updated and merged.

@kobelb kobelb requested a review from a team as a code owner February 14, 2019 16:45
@elasticmachine
Copy link
Contributor

💔 Build Failed

@azasypkin
Copy link
Member

azasypkin commented Mar 25, 2020

@kobelb wondering if we can close this PR? (cleaning up review dashboard 🙂 )

@kobelb
Copy link
Contributor Author

kobelb commented Mar 25, 2020

@kobelb wondering if we can close this PR? (cleaning up review dashboard 🙂 )
Yup, closing now...

@kobelb kobelb closed this Mar 25, 2020
@kobelb kobelb deleted the security-should-authenticate branch March 25, 2020 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants