Repository navigation
Unable to upload ssl certificate in project view #4749
Copy link
Copy link
Closed
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
API, UI
CLOUDSTACK VERSION
4.15.0
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
If i try to upload an ssl certificate in project view, the UI is passing projectid along with account name and domainid and hence uploading a ssl certificate fails
STEPS TO REPRODUCE
1. Login to ui
2. Switch to project view
3. Navigate to accounts -> certificate -> enter details -> click on upload certificate
EXPECTED RESULTS
The ssl cert should be uploaded successfully
ACTUAL RESULTS
Error is thrown
Logs from mgt server
2021-03-04 11:14:07,536 DEBUG [c.c.a.ApiServlet] (qtp1292738535-15:ctx-fc131d73) (logid:b919cf12) ===START=== 10.0.100.191 -- POST command=uploadSslCert&response=json&projectid=2948012c-8a07-4cc2-999e-9029e86d2fa4
2021-03-04 11:14:07,550 DEBUG [c.c.a.ApiServer] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) CIDRs from which account 'Acct[4048bfec-c28e-11ea-9a43-0617bc003377-admin]' is allowed to perform API calls: 0.0.0.0/0,::/0
2021-03-04 11:14:07,664 DEBUG [c.c.a.m.ClusteredAgentAttache] (StatsCollector-2:ctx-4a51a024) (logid:a4043193) Seq 1-1603562942320609560: Forwarding null to 95534014697
2021-03-04 11:14:07,669 DEBUG [o.a.c.n.s.CertServiceImpl] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) Certificate Validation succeeded
2021-03-04 11:14:07,672 ERROR [o.a.c.n.s.CertServiceImpl] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) account name is admin
2021-03-04 11:14:07,674 ERROR [o.a.c.n.s.CertServiceImpl] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) domain id is 1
2021-03-04 11:14:07,675 ERROR [o.a.c.n.s.CertServiceImpl] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) project id is 18
2021-03-04 11:14:07,676 ERROR [o.a.c.n.s.CertServiceImpl] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) finalizing account
2021-03-04 11:14:07,692 INFO [c.c.a.ApiServer] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) ProjectId and account/domainId can't be specified together
2021-03-04 11:14:07,695 DEBUG [c.c.a.ApiServlet] (qtp1292738535-15:ctx-fc131d73 ctx-954c36d5) (logid:b919cf12) ===END=== 10.0.100.191 -- POST command=uploadSslCert&response=json&projectid=2948012c-8a07-4cc2-999e-9029e86d2fa4
I worked on this issue before in apache/cloudstack-primate#893 but that may not solve the issue
@rhtyd @DaanHoogland @weizhouapache
Reactions are currently unavailable

Activity
DaanHoogland commentedon Mar 5, 2021
as you refer to that PR and say it doesn't solve it, have you determined the problem to be in the API, @ravening ?
ravening commentedon Mar 5, 2021
@DaanHoogland problem is, the UI is sending account, domain is and projectid which is the issue.. so want to know how this can be solved
DaanHoogland commentedon Mar 5, 2021
yes, I skimmed through apache/cloudstack-primate#893 but you wrote "that may not solve the issue", why?
ravening commentedon Mar 8, 2021
@DaanHoogland if I remove account/domainid from ui then as admin, I cant upload ssl for other domains
DaanHoogland commentedon Mar 8, 2021
I just tested that PR and it works for project-view cert upload. Let's merge and go from there
yadvr commentedon Mar 11, 2021
Fixed in #4761