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

tctl sso configure github produces an untestable connector spec #31396

Closed
tcsc opened this issue Sep 3, 2023 · 2 comments · Fixed by #31397
Closed

tctl sso configure github produces an untestable connector spec #31396

tcsc opened this issue Sep 3, 2023 · 2 comments · Fixed by #31397
Assignees
Labels
bug enterprise Issue specific to our enterprise customers. test-plan-problem Issues which have been surfaced by running the manual release test plan

Comments

@tcsc
Copy link
Contributor

tcsc commented Sep 3, 2023

Expected behavior:

$ tctl sso configure github --id $(cat ./github.client-id) --secret $(cat ./github.secret) --teams-to-roles GGUXGXM3Q5QDN6CD,Admin,editor -r GGUXGXM3Q5QDN6CD,everyone,access | tctl sso test
INFO [CLIENT]    RedirectURL empty, resolving automatically.
INFO [CLIENT]    RedirectURL set to "https://sso.dev-trent.net:443/v1/webapi/github/callback"
If browser window does not open automatically, open it by clicking on the link:
 http://127.0.0.1:50272/40573469-96a7-48b4-b15e-e8eb1694a428
Success! Logged in as: tcsc
--------------------------------------------------------------------------------
Authentication details:
# ... and so on

Current behavior:

$ tctl sso configure github --id $(cat ./github.client-id) --secret $(cat ./github.secret) --teams-to-roles GGUXGXM3Q5QDN6CD,Admin,editor -r GGUXGXM3Q5QDN6CD,everyone,access | tctl sso test
INFO [CLIENT]    RedirectURL empty, resolving automatically.
INFO [CLIENT]    RedirectURL set to "https://sso.dev-trent.net:443/v1/webapi/github/callback"
ERROR: Failed to create auth request. Check the auth connector definition for errors. Error: rpc error: code = Unknown desc = url scheme is empty

NOTE: The generated connector works when added to a Teleport cluster, but it looks like something is adding the missing fields when the connector is saved

Bug details:

  • Teleport version: Teleport Enterprise v14.0.0-alpha.2 git:api/v14.0.0-alpha.2-0-g71aea8d go1.21.0
@tcsc tcsc added the bug label Sep 3, 2023
@tcsc tcsc self-assigned this Sep 3, 2023
tcsc added a commit that referenced this issue Sep 4, 2023
`tctl sso configure github` was producing an untestable connector
spec, or at least a spec that would _always fail_ when tested with
`tctl ssl test`, due to missing GitHub endpoints in the generated
spec.

This change adds the default GitHub endpoint URLs as default values
for the endpoint flags in `tctl sso configure github` so that the
produces spec is valis and testable.

Note: Our WebUI appears to magically add these values when saving
      a connector, so this issue only really effects `tctl sso test`

Includes doc update to match new output.

Fixes: #31396
Changelog: `tctl sso configure github` now includes default Github endpoints
@tcsc tcsc added test-plan-problem Issues which have been surfaced by running the manual release test plan enterprise Issue specific to our enterprise customers. labels Sep 4, 2023
@tcsc
Copy link
Contributor Author

tcsc commented Sep 4, 2023

Turns out this is what happens when you use an Enterprise tctl to test the sso connector on an Enterprise cluster.

Using an OSS tctl on an Enterprise cluster works as expected.

See: #31397 (comment)

@zmb3
Copy link
Collaborator

zmb3 commented Sep 4, 2023

Duplicate of #31387?

github-merge-queue bot pushed a commit that referenced this issue Sep 5, 2023
`tctl sso configure github` was producing an untestable connector
spec, or at least a spec that would _always fail_ when tested with
`tctl ssl test`, due to missing GitHub endpoints in the generated
spec.

This change adds the default GitHub endpoint URLs as default values
for the endpoint flags in `tctl sso configure github` so that the
produces spec is valis and testable.

Note: Our WebUI appears to magically add these values when saving
      a connector, so this issue only really effects `tctl sso test`

Includes doc update to match new output.

Fixes: #31396
Changelog: `tctl sso configure github` now includes default Github endpoints
github-actions bot pushed a commit that referenced this issue Sep 5, 2023
`tctl sso configure github` was producing an untestable connector
spec, or at least a spec that would _always fail_ when tested with
`tctl ssl test`, due to missing GitHub endpoints in the generated
spec.

This change adds the default GitHub endpoint URLs as default values
for the endpoint flags in `tctl sso configure github` so that the
produces spec is valis and testable.

Note: Our WebUI appears to magically add these values when saving
      a connector, so this issue only really effects `tctl sso test`

Includes doc update to match new output.

Fixes: #31396
Changelog: `tctl sso configure github` now includes default Github endpoints
github-actions bot pushed a commit that referenced this issue Sep 5, 2023
`tctl sso configure github` was producing an untestable connector
spec, or at least a spec that would _always fail_ when tested with
`tctl ssl test`, due to missing GitHub endpoints in the generated
spec.

This change adds the default GitHub endpoint URLs as default values
for the endpoint flags in `tctl sso configure github` so that the
produces spec is valis and testable.

Note: Our WebUI appears to magically add these values when saving
      a connector, so this issue only really effects `tctl sso test`

Includes doc update to match new output.

Fixes: #31396
Changelog: `tctl sso configure github` now includes default Github endpoints
github-merge-queue bot pushed a commit that referenced this issue Sep 8, 2023
`tctl sso configure github` was producing an untestable connector
spec, or at least a spec that would _always fail_ when tested with
`tctl ssl test`, due to missing GitHub endpoints in the generated
spec.

This change adds the default GitHub endpoint URLs as default values
for the endpoint flags in `tctl sso configure github` so that the
produces spec is valis and testable.

Note: Our WebUI appears to magically add these values when saving
      a connector, so this issue only really effects `tctl sso test`

Includes doc update to match new output.

Fixes: #31396
Changelog: `tctl sso configure github` now includes default Github endpoints
github-merge-queue bot pushed a commit that referenced this issue Sep 8, 2023
`tctl sso configure github` was producing an untestable connector
spec, or at least a spec that would _always fail_ when tested with
`tctl ssl test`, due to missing GitHub endpoints in the generated
spec.

This change adds the default GitHub endpoint URLs as default values
for the endpoint flags in `tctl sso configure github` so that the
produces spec is valis and testable.

Note: Our WebUI appears to magically add these values when saving
      a connector, so this issue only really effects `tctl sso test`

Includes doc update to match new output.

Fixes: #31396
Changelog: `tctl sso configure github` now includes default Github endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enterprise Issue specific to our enterprise customers. test-plan-problem Issues which have been surfaced by running the manual release test plan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants