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

Zh/proxmox client api token authentication #62

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

zkhussain
Copy link
Contributor

No description provided.

@Cliftonz
Copy link
Member

did you consider what we need to do to update our API calls?

@zkhussain
Copy link
Contributor Author

zkhussain commented Jan 12, 2022

Yes, so setting a token to client.ApiToken sets the HTTP Authentication header to the value provided, and each API request is made through that.

@Cliftonz
Copy link
Member

And that has been tested that it will work on your end, correct?

@zkhussain
Copy link
Contributor Author

Yes, I tested in my local proxmox host, it creates the token and sets the header with it.

@Cliftonz
Copy link
Member

Cool just making sure. What part of this do you still need to do?

@zkhussain
Copy link
Contributor Author

zkhussain commented Jan 12, 2022

Need to make sure to get rid of the ticket based authentication properly, which is produced by username/password

@Cliftonz
Copy link
Member

@jasekiw Could you look at this?

@jasekiw
Copy link
Contributor

jasekiw commented Jan 12, 2022

@jasekiw Could you look at this?

I talked to zaid after the call and told him how to fix the issue here with the null reference exception. I'll take a look after he fixes that.

@zkhussain
Copy link
Contributor Author

zkhussain commented Jan 12, 2022

I talked to zaid after the call and told him how to fix the issue here with the null reference exception. I'll take a look after he fixes that.

@jasekiw I pushed the changes, sorry forgot to do so the other night. I still need to make some changes before your review. I'll try to update soon.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Value = apiKey.Response.data.value
};
}

public async Task<TicketResponse> GetTicket(int vmId)
Copy link
Contributor Author

@zkhussain zkhussain Jan 23, 2022

Choose a reason for hiding this comment

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

@jasekiw Using API tokens gets rid of the need to log in to the proxmox API with username and password. The Login method we use logs in and generates a ticket, which is used to authenticate noVNC in cslabs-webapp/src/api/rfb.ts. Since API tokens will remove the need for log in, a ticket will not be generated to authenticate to noVNC, and I am receiving a 401 unauthorized if I do so. Reference to the proxmox API here. I may have missed something, I am not sure what we can do or maybe there is another way?

Copy link
Contributor

@jasekiw jasekiw Apr 4, 2022

Choose a reason for hiding this comment

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

@zkhussain Is there a time you are available to go through this via zoom? I would like you to demonstrate the issue for me if you can.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, evening times work best. Tomorrow after the meeting?

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.

3 participants