When using access tokens, make sure your NiFi instance is configured to not require client certificates for the TLS certificates:
nifi.security.needClientAuth=false This is because you only want the NiFi server (not the client) to establish its identity with a TLS certificate; the client will establish identity after the TLS connection is established by passing the username and password credentials that will be validated by the Login Identity Provider you configured for NiFi. For example: nifi.security.user.login.identity.provider=ldap-provider where “ldap-provider” is configured in login-identity-providers.xml Hope this helps! Kevin From: Tian TD Deng <[email protected]> Reply-To: <[email protected]> Date: Friday, March 16, 2018 at 04:51 To: <[email protected]> Subject: Error when sending HTTPS request to Nifi using the Restful API Dear All, I was trying to send HTTPS request to Nifi using the Restful API via curl, however, it didn't work as expected. curl -k --tlsv1.2 https://localhost:8443/nifi-api/access/token --data 'username=test&password=password' Could you please help to give some advice about this? Thanks a lot! Thanks & Best Regards Joey(Tian) Deng ------------------------------------------------------------------------------------------- IT Specialist IBM China Global Delivery Center Tel: (+86) 27 59269644 E-mail: [email protected] WhatsApp: +86 15671158671 -------------------------------------------------------------------------------------------
