Skip to content

Zh/proxmox client api token authentication#62

Draft
zkhussain wants to merge 4 commits into
devfrom
zh/proxmox-client-api-token-auth
Draft

Zh/proxmox client api token authentication#62
zkhussain wants to merge 4 commits into
devfrom
zh/proxmox-client-api-token-auth

Conversation

@zkhussain

Copy link
Copy Markdown
Contributor

No description provided.

@Cliftonz

Copy link
Copy Markdown
Member

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

@zkhussain

zkhussain commented Jan 12, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

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

@zkhussain

Copy link
Copy Markdown
Contributor Author

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

@Cliftonz

Copy link
Copy Markdown
Member

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

@zkhussain

zkhussain commented Jan 12, 2022

Copy link
Copy Markdown
Contributor Author

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

@Cliftonz

Copy link
Copy Markdown
Member

@jasekiw Could you look at this?

@jasekiw

jasekiw commented Jan 12, 2022

Copy link
Copy Markdown
Contributor

@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

zkhussain commented Jan 12, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown

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

};
}

public async Task<TicketResponse> GetTicket(int vmId)

@zkhussain zkhussain Jan 23, 2022

Copy link
Copy Markdown
Contributor Author

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?

@jasekiw jasekiw Apr 4, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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