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

Use proxyURL to log into sandbox using Red Hat auth token #2743

Conversation

dgolovin
Copy link
Collaborator

@dgolovin dgolovin commented Jan 18, 2023

Getting resources seems to work fine through the proxy, but there are two problems to solve:

  1. idToken lives 900 seconds and then have to be refreshed in kubeconfig (that probably affects live connections through the proxy that already exists at the moment when refresh happens)
  2. odo dev cannot sync files through the proxy

Fix #2519.

Signed-off-by: Denis Golovin [email protected]

@@ -29,6 +29,7 @@ export interface SBSignupResponse {
givenName: string;
status: SBStatus;
username: string;
proxyURL: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new attribute in reg service response

@@ -173,7 +173,7 @@ async function clusterEditorMessageListener (event: any ): Promise<any> {
case 'sandboxLoginUsingDataInClipboard':
const telemetryEventLoginToSandbox = new ExtCommandTelemetryEvent('openshift.explorer.addCluster.sandboxLoginUsingDataInClipboard');
try {
const result = await Cluster.loginUsingClipboardToken(event.payload.apiEndpointUrl, event.payload.oauthRequestTokenUrl);
const result = await Cluster.loginUsingClipboardToken(event.payload.proxyUrl, (sessionCheck as any).idToken);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Login to the sandbox using proxyUrl and token from RedHat SSO. No need to get sandbox token from browser.

@dgolovin dgolovin force-pushed the i2519-use-proxy-url-and-redhat-auth-token-for-sandbox-login branch from 3350909 to 88c5cf7 Compare March 23, 2023 21:53
@vrubezhny
Copy link
Contributor

Incorporated by #4439.

@vrubezhny vrubezhny closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use sandbox proxyURL with idToken to work with sandbox cluster
2 participants