https://www.ibm.com/developerworks/security/library/mw-1607-hutchinson-trs/1607-hutchinson.html?ca=drs-
Make secure API calls in IBM API Connect
Add TLS profiles to protect assets in back-end systems
Secure Socket Layer (SSL) is used for security over a network. In IBM® API Connect, Transport Layer Security (TLS) profiles are used to secure transmission of data through websites. TLS and SSL certificates guarantee that information you submit will not be stolen or tampered with. The ability to connect to a secure back-end system is essential, and setting up security correctly is not always an obvious task.
In this tutorial, you learn how to retrieve a certificate and then create a TLS profile in API Manager. By using this profile, you can connect API Connect to SSL-enabled back-end systems. To understand this tutorial, you should have previous knowledge about TLS and API Connect.
What you'll need for this tutorial
- API Connect. See the API Connect Deveveloper Center and API Connect on Bluemix®.
- An IBM Bluemix account
- OpenSSL
- Access to the Internet and a browser. This tutorial uses Mozilla Firefox.
- A certificate that you want to add to the back end. This certificate can be a self-signed certificate or any signer certificate.
Retrieve a certificate
In this step, you retrieve your certificate either by using the OpenSSL command-line interface or by accessing the certificate from within your browser. API Connect supports only the P12 (PKCS12) and PEM certificate formats for the truststore.
Option 1: Use OpenSSL
Retrieve your certificate:
- Open OpenSSL and view your certificates as follows. Specify your own
host name and port.
openssl s_client -connect {HOSTNAME}:{PORT} –showcerts
- Copy and paste the information between the BEGIN CERTIFICATE and END CERTIFICATE tags, including the tags, to a text file on your PC. If you have multiple certificates, retrieve each one.
- Save the file with a meaningful name that uses the .ctr extension.
Option 2: Use your web browser
If you are using Mozilla Firefox, retrieve your certificate as explained here and shown in the following figure:
- Click the SSL certificate icon at the top or Padlock at the bottom.
- Click View Certificate.
- Click the Details tab.
- From the hierarchy of certificates, choose the certificate that you want.
- Click Export.
- Save the certificate locally.
On an Apple® Mac®, follow these steps:
- From the Firefox menu, select Preferences.
- From the left menu, select Advanced.
- Under Certificates, click View Certificates.
- Click Your Certificates.
Add the certificate to API Connect
Add the certificate to the API in API Connect:
- Open API Connect. Select Admin.
- Click TLS profiles.
- Create a TLS profile.
- Enter a display name and name for your TLS profile.
- Enter a value in the Description field.
- Add a Trust Store and upload the certificates.
- Click the arrow next to Protocols.
- Select TLS version 1.0 (or other version that you are using). The following figure shows an example TLS profile.
Add the TLS profile to your API
Add the profile to your API:
- Go back to the API that is using the certificate.
- Click the Assemble tab.
- Click Invoke.
- In the section for the TLS profile, click the arrow and select the profile that you just created.
- Click Save. As shown in the following figure, the TLS profile is added.
Conclusion
This tutorial showed you how to create a simple TLS profile and then add it to an API in API Connect. With the profile, API calls can communicate with SSL-enabled back-end systems for secure transmission of data.
Downloadable resources
Related topics
- IBM API Connect Developer Center
- API Connect articles and tutorials in developerWorks Middleware
- API Connect learning path
- IBM Knowledge Center: API Connect V5
'IBM - old > IBM APIC' 카테고리의 다른 글
[APIC]Mock Backend Services with User Defined Gateway Policies (0) | 2017.05.19 |
---|---|
[APIC]IBM API Connect 관련 샘플 API 들 github 로 공유 (0) | 2017.04.17 |
[APIC]IBM API Connect 관련 YouTube 채널 (0) | 2017.03.07 |
[APIC]IBM API Connect 의 Assemble 성능 테스트 및 튜닝 (0) | 2017.03.07 |
[APIC]Developer Toolkit 을 활용하여 DevOps 형태로 Urbancode 나 Jenkins 와 연동하기 위한 다양한 CLI 명령 (0) | 2017.02.13 |
댓글