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

Remove hyphen from openid-connect section of the endpoints api #3241

Merged

Conversation

npalaska
Copy link
Member

@npalaska npalaska commented Feb 9, 2023

Addresses issue #3240
Originally asked here

Commit message:

Remove hyphen from openid-connect section of the endpoints API

  • Getting rid of the excess quotes and brackets would make this easier to read
  • It also makes easier to reference in Dashboard javascript code when there is
    no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])

@npalaska npalaska self-assigned this Feb 9, 2023
@npalaska npalaska added Server Users Of and relating to working with users. labels Feb 9, 2023
@npalaska npalaska added this to In progress in v0.72 via automation Feb 9, 2023
@npalaska npalaska added this to the v0.72 milestone Feb 9, 2023
dbutenhof
dbutenhof previously approved these changes Feb 9, 2023
Copy link
Member

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

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

I don't know that issuer needed to change to server (although I suspect it's more accurate as we have the broker address but we expect an different SSO "issuer") ... but I don't object. 😄

v0.72 automation moved this from In progress to Reviewer approved Feb 9, 2023
@dbutenhof
Copy link
Member

By the way; make sure your merge commit has a better explanation than just that.

webbnh
webbnh previously approved these changes Feb 9, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

👍

@npalaska
Copy link
Member Author

npalaska commented Feb 9, 2023

By the way; make sure your merge commit has a better explanation than just that.

I updated the description with a commit message.

Copy link
Member

@portante portante left a comment

Choose a reason for hiding this comment

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

Why is this needed?

v0.72 automation moved this from Reviewer approved to Review in progress Feb 9, 2023
@webbnh
Copy link
Member

webbnh commented Feb 9, 2023

Why is this needed?

I'm sorry that the references in the description weren't sufficient.

The answer is that the presence of the hyphen in the name, openid-connect, makes the identifier awkward to use in the Dashboard's Javascript code. (Not impossible, not even hard, just awkward and ugly.) So, if we rename it here, it makes life better there.

Copy link
Member

@portante portante left a comment

Choose a reason for hiding this comment

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

Is this the kind of code change we want to be making now before we have verified the server is deployed in staging? It seems that given our time constraints to deploy by mid-March we should spend on time on other kinds of changes.

@@ -140,15 +140,15 @@ def check_config(self, client, server_config, host, my_headers={}):

try:
oidc_client = server_config.get("openid-connect", "client")
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, these lists were in sorted order.

Copy link
Member

Choose a reason for hiding this comment

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

I support keeping the list in sorted order.

On another note, @portante, when commenting on multiple lines, you can drag-select to highlight the range, and doing so has two effects: first, in the "Conversation" display, your comment will be preceded by the code from the range (instead of the default three or so lines), and, second and more importantly, your comment will be displayed after the range (in this instance, it would have made clear what you meant by "these lists").

except (NoOptionError, NoSectionError):
pass
else:
endpoints["openid-connect"] = {
endpoints["openid"] = {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps "OpenID Connect" could be shortened to oidc if we really need it that short?

Copy link
Member

Choose a reason for hiding this comment

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

Brevity is not the issue; what we're trying to do is to make it be a valid Javascript identifier, which means removing the hyphen.

Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

Is this the kind of code change we want to be making now before we have verified the server is deployed in staging? It seems that given our time constraints to deploy by mid-March we should spend on time on other kinds of changes.

That question is constructive looking forward; however, as regards this particular change, the work is already done, and I do not think that accepting this change at this point will adversely affect the Staging server deployment (and, I believe that it will ease the addition of Keycloak-based authentication).

@@ -140,15 +140,15 @@ def check_config(self, client, server_config, host, my_headers={}):

try:
oidc_client = server_config.get("openid-connect", "client")
Copy link
Member

Choose a reason for hiding this comment

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

I support keeping the list in sorted order.

On another note, @portante, when commenting on multiple lines, you can drag-select to highlight the range, and doing so has two effects: first, in the "Conversation" display, your comment will be preceded by the code from the range (instead of the default three or so lines), and, second and more importantly, your comment will be displayed after the range (in this instance, it would have made clear what you meant by "these lists").

except (NoOptionError, NoSectionError):
pass
else:
endpoints["openid-connect"] = {
endpoints["openid"] = {
Copy link
Member

Choose a reason for hiding this comment

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

Brevity is not the issue; what we're trying to do is to make it be a valid Javascript identifier, which means removing the hyphen.

@portante
Copy link
Member

portante commented Feb 9, 2023

Is this the kind of code change we want to be making now before we have verified the server is deployed in staging? It seems that given our time constraints to deploy by mid-March we should spend on time on other kinds of changes.

That question is constructive looking forward; however, as regards this particular change, the work is already done, and I do not think that accepting this change at this point will adversely affect the Staging server deployment (and, I believe that it will ease the addition of Keycloak-based authentication).

I don't believe the principle of accepting something because it is already done is a good principle to follow for a project. That line of thinking means that any PR submitted should be accepted because it is done.

In this case, we don't need to be accepting ANYTHING for OpenID Connect support. If folks want to build up a series of commits for OpenID Connect on a separate branch to be merged later, great.

But we need to remain focused.

@npalaska
Copy link
Member Author

npalaska commented Feb 9, 2023

I don't believe the principle of accepting something because it is already done is a good principle to follow for a project. That line of thinking means that any PR submitted should be accepted because it is done.

In this case, we don't need to be accepting ANYTHING for OpenID Connect support. If folks want to build up a series of commits for OpenID Connect on a separate branch to be merged later, great.

But we need to remain focused.

@portante If you want to have main only focus on things we need to do other than OpenID-related changes and then deploy it on the staging and after that we can merge all the OpenID-related changes onto the main, I am fine with it. We can create another branch for the time being for all the OpenID-related changes that we can consolidate on the main later.

@npalaska npalaska dismissed stale reviews from dbutenhof and webbnh via 4ae3ea6 February 9, 2023 18:17
@npalaska npalaska changed the base branch from main to openid-connect February 9, 2023 18:42
@npalaska
Copy link
Member Author

npalaska commented Feb 9, 2023

FWIW, this will now land in openid-connect branch instead of main, that's where all the openid-connect related changes will go for a while until we have a staging server deployed.

Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

👍

@portante portante dismissed their stale review February 9, 2023 20:53

Since this is no longer targeting main it is not a concern.

v0.72 automation moved this from Review in progress to Reviewer approved Feb 9, 2023
@npalaska npalaska merged commit f04b8fa into distributed-system-analysis:openid-connect Feb 9, 2023
v0.72 automation moved this from Reviewer approved to Done Feb 9, 2023
npalaska added a commit to npalaska/pbench that referenced this pull request Mar 9, 2023
…ibuted-system-analysis#3241)

Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit that referenced this pull request Mar 13, 2023
Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit to npalaska/pbench that referenced this pull request Mar 27, 2023
…ibuted-system-analysis#3241)

Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit to npalaska/pbench that referenced this pull request Mar 27, 2023
…ibuted-system-analysis#3241)

Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit to npalaska/pbench that referenced this pull request Mar 28, 2023
…ibuted-system-analysis#3241)

Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit to npalaska/pbench that referenced this pull request Mar 30, 2023
…ibuted-system-analysis#3241)

Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit to npalaska/pbench that referenced this pull request Mar 31, 2023
…ibuted-system-analysis#3241)

Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
npalaska added a commit that referenced this pull request Mar 31, 2023
Remove hyphen from openid-connect section of the endpoints API

- Getting rid of the excess quotes and brackets would make this easier to read
- It also makes it easier to reference in Dashboard javascript code when there is
no hyphen involved (endpoints.openid instead of endpoints['openid-connect'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server Users Of and relating to working with users.
Projects
v0.72
  
Done
Development

Successfully merging this pull request may close these issues.

Renameopenid-connect variable in the endpoints api to openid or openid_connect?
4 participants