Skip to content

API uploadSslCert does not work #2558

Closed

Description

@s-seitz
ISSUE TYPE
  • Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.11.0.0
CONFIGURATION

Advanced Networking, Cloudstack 4.11.0.0 on Ubuntu 14.04 LTS, MySQL 5.5.59-0ubuntu0.14.04.1

OS / ENVIRONMENT

Ubuntu 14.04.5 LTS

SUMMARY

Uploading sslcertificates ( https://cloudstack.apache.org/api/apidocs-4.11/apis/uploadSslCert.html ) fails for two reasons.
a) Including the CertChain, it's very likely that the Request Header Size grows > 8k and results in HTTP Error 414.
b) Leaving the CertChain empty to get a shorter GET Request, the Cloudstack API responds with Error 530: DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@7ba59657

STEPS TO REPRODUCE

Here 's the sample output of a response. For obvious reasons the certificate, key and fingerprint  as well as the name are redacted.

Error 530: DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@7ba59657: INSERT INTO sslcerts (sslcerts.id, sslcerts.uuid, sslcerts.certificate, sslcerts.chain, sslcerts.key, sslcerts.password, sslcerts.account_id, sslcerts.domain_id, sslcerts.fingerprint, sslcerts.name) VALUES (null, _binary'4ed417b3-77b6-42bf-9a82-81ed25aaedc2', _binary'-----BEGIN CERTIFICATE-----\n R E D A C T E D \n-----END CERTIFICATE-----', null, _binary'K E Y R E D A C T E D==', null, 160, 2, _binary'00:11:22:33:44:55:66:77:88:F7:AE:73:81:BA:D9:B7:AF:46:D8:E2:F8:EA:7C:FF:00:B7:DE:F7:D7:CF:9B:C9', _binary'STAR.some.tld')
errorcode,uuidList,cserrorcode,errortext



EXPECTED RESULTS

One would expect a certificate available to select after uploading it.

ACTUAL RESULTS


Activity

  1. added this to the 4.11.1.0 milestone on Apr 23, 2018
  2. self-assigned this
    on Apr 30, 2018
  3. removed their assignment
    on May 9, 2018
  4. yadvr commented on May 9, 2018

    @yadvr
    Member

    @GabrielBrascher can you pick this up as well? Thanks.

  5. GabrielBrascher commented on May 9, 2018

    @GabrielBrascher
    Member

    Yes @rhtyd, I will take a look at it.

  6. yadvr commented on May 15, 2018

    @yadvr
    Member

    @GabrielBrascher any update on this, thanks.

  7. PaulAngus commented on May 21, 2018

    @PaulAngus
    Member

    @GabrielBrascher - we're looking to cut an RC soonish, do you have an eta for a fix please?

  8. GabrielBrascher commented on May 21, 2018

    @GabrielBrascher
    Member

    @rhtyd @PaulAngus sorry for the delay but I am still working on this one. Do you think we should push this to 4.11.2? How much time do I have to finish it for 4.11.1?

  9. DaanHoogland commented on May 22, 2018

    @DaanHoogland
    Contributor

    :) -(a weekend)
    The question is not how much time you have but how much we need this in, @GabrielBrascher

  10. yadvr commented on May 22, 2018

    @yadvr
    Member

    @GabrielBrascher can you at least help test this against a normal certificate of size less than 8k? Usually certificates are 2k-4k in size. If there are no blockers around using custom certificates, then yes we can discuss pushing it for 4.11.2.0 milestone.

  11. GabrielBrascher commented on May 22, 2018

    @GabrielBrascher
    Member

    We are making a GET request, not a POST. I created PR 2661 to fix it.

  12. added a commit that references this issue on May 23, 2018
    eb23d91
  13. added a commit that references this issue on May 23, 2018
    ea373eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions