Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Service Provider(Qliksense) initiated Authentication Process
The following process is about how to setup SAML authentication for users in AWS environment if there is no no trust available between enterprise active directory(Idp) and AWS MAD(managed active directory).
for SAML:
Requirements for SAML setup:
Steps for SAML Config:
Note-
If using ALB in AWS then all traffic from Idp will be forwarded to ALB first and then ALB will forward the traffic to the target EC2s. If the ALB's listening port is different to Qliksense proxy's listening port, then update the ACS URL endpoint in Idp with the port that ALB is listening. Please don't use the same port as Qliksense proxy is listening which was available in SP metadata. Example-
Incase of using ALB-ACS URL=https://<saml host uri name>:<ALB listening port>/<virtual proxy prefix>/samlauthn/
Incase of only using EC2/windows host=ACS URL=https://<saml host uri name>:<Qliksense proxy listening port(i.e. default value is 443)>/<virtual proxy prefix>/samlauthn/
Procedure to create CSR with SAN: One can do it in both Windows and Linux OS
[ req ]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
stateOrProvinceName = State or Province Name (full name)
localityName = Locality Name (eg, city)
organizationName = Organization Name (eg, company)
commonName = Common Name (e.g. server FQDN or YOUR name)
[ req_ext ]
subjectAltName = @alt_names
[alt_names]
EXAMPLE:
DNS.1 = bestflare.com
DNS.2 = usefulread.com
DNS.3 = chandank.com
Note: alt_names section is the one you have to change for additional DNS.
openssl req -out sslcert.csr -newkey rsa:2048 -nodes -keyout private.key -config san.cnf
Possible errors:
Error:500
Error:400
Procedure to create CSR with SAN: One can do it in both Windows and Linux OS
[ req ]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
stateOrProvinceName = State or Province Name (full name)
localityName = Locality Name (eg, city)
organizationName = Organization Name (eg, company)
commonName = Common Name (e.g. server FQDN or YOUR name)
[ req_ext ]
subjectAltName = @alt_names
[alt_names]
EXAMPLE:
DNS.1 = bestflare.com
DNS.2 = usefulread.com
DNS.3 = chandank.com
Note: alt_names section is the one you have to change for additional DNS.
openssl req -out sslcert.csr -newkey rsa:2048 -nodes -keyout private.key -config san.cnf
Create the pfx file with .cer and private key(.key) file
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.cer
extract the private key from .pfx file
openssl pkcs12 -in certificate.pfx -nocerts -nodes -out privateKey.key
Extract the .cer from .pfx file
openssl pkcs12 -in certificate.pfx -clcerts -nokeys -out certificate.cer
Check if .cer contains private key
openssl x509 -in certificate.cer -text -noout
Exporting the certificate is pretty easy, just use the following command:
openssl pkcs12 -in pfxkeystore.pfx -out certificate.pem -nokeys -nodes
The exported certificate is not a x509 certificate. To convert it use the following command:
openssl x509 -outform der -in certificate.pem -out certificate.cer
to check the CSP
certutil -dump c:\temp\idp.pfx
Steps to convert the CSP are as follows
Firstly, it must be converted from PKCS12 to PEM format. From the example below, you will see how to convert a single .pfx file containing both certificate and private key into a .pem format. When it was asked, be ready to provide the password used for protecting the private key.
openssl pkcs12 -in c:\temp\idp.pfx -out c:\temp\idp.pem
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
Enter Import Password:
MAC verified OK
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
2. Then it must be converted back to PKCS12 specifying the Microsoft Enhanced RSA and AES Cryptographic Provider.
openssl pkcs12 -export -in c:\temp\idp.pem -out c:\temp\new-idp.pfx -CSP "Microsoft Enhanced RSA and AES Cryptographic Provider" -certpbe PBE-SHA1-3DES -keypbe PBE-SHA1-3DES -macalg sha1
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
Enter pass phrase for c:\temp\idp.pem:
Enter Export Password:
Verifying - Enter Export Password:
3. Now you can verify the CSP in the new PFX file with the CertUtil command again.
certutil -dump c:\temp\new-idp.pfx
Enter PFX password:
================ Certificate 0 ================
================ Begin Nesting Level 1 ================
Element 0:
Serial Number: 09ec562aa92ffa0ed554f5135afa3ccb
Issuer: CN=DigiCert High Assurance CA-3, OU=www.digicert.com, O=DigiCert Inc, C=US
NotBefore: 2/7/2013 2:00 AM
NotAfter: 4/4/2016 2:00 PM
Subject: CN=*.qlik.com, O=QlikTech International AB, L=Lund, S=Skane, C=SE
Non-root Certificate
Cert Hash(sha1): d7 fe a0 8d c7 f5 e5 e4 ff e9 14 91 00 d9 95 5f 61 51 00 68
---------------- End Nesting Level 1 ----------------
Provider =
Microsoft Enhanced RSA and AES Cryptographic Provider
Encryption test passed
CertUtil: -dump command completed successfully.
The new PFX file is now ready for generating SHA-256, SHA-384 and SHA-512 XML signatures.
Conversion is Done!
OPTIONAL: If you have your certificate and private key stored in the .pem format already but separate files, the following command will help you to combine them and generate the .pfx file with the correct CSP.
openssl pkcs12 -export -inkey key.pem -in cert.pem -out new-idp.pfx -CSP "Microsoft Enhanced RSA and AES Cryptographic Provider" -certpbe PBE-SHA1-3DES -keypbe PBE-SHA1-3DES -macalg sha1
Possible errors:
Error:500
Error:400