> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/getting-started-guide/enable-https.md).

# Enable HTTPS

Put a valid TLS certificate in front of OpenIAM and serve the portals over HTTPS.

**Goal:** OpenIAM served over HTTPS with your real certificate.\
**Time:** 15–20 minutes.\
**Prerequisites:** install complete; certificate, private key, and CA bundle for your OpenIAM DNS name on hand.

Do this now rather than later: the first-login flow asks whether the application supports SSL, and SAML federation with Microsoft Entra **requires** HTTPS (and fails confusingly without it).

## Don't have a certificate yet? Three lab-friendly options

| Option            | When                                                               | How                                                                                                                                                                                                                                                                                                                                    |
| ----------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Let's Encrypt** | Host has a public DNS name and port 80 reachable from the internet | `sudo dnf install certbot && sudo systemctl stop httpd && sudo certbot certonly --standalone -d openiam.poc.example.com && sudo systemctl start httpd` — standalone mode needs port 80, which Apache is holding, hence the stop/start. Cert lands in `/etc/letsencrypt/live/<name>/` (use `fullchain.pem` and `privkey.pem` in step 2) |
| **Internal CA**   | Your org runs AD CS or another internal CA                         | Issue a web-server cert for the DNS name; fine for the lifecycle POC and internal SSO — browsers inside your org trust it                                                                                                                                                                                                              |
| **Self-signed**   | Nothing else available                                             | Works for the lifecycle POC only; every browser will warn, and **federation with Entra will not work** (Microsoft requires a trusted, internet-reachable HTTPS endpoint). Plan to swap in one of the above before [OpenIAM as IdP for Microsoft Entra ID](/getting-started-guide/federation/openiam-idp-entra.md)                      |

{% hint style="warning" %}
If you plan to do the federation pages, note the requirement now: the OpenIAM host must be reachable **from the internet** over HTTPS with a **publicly trusted** certificate. A self-signed certificate is enough for the lifecycle POC, but you will have to replace it before [OpenIAM as IdP for Microsoft Entra ID](/getting-started-guide/federation/openiam-idp-entra.md).
{% endhint %}

{% stepper %}
{% step %}
**Place the certificate files**

{% code overflow="wrap" %}

```bash
sudo cp your_openiam_host.crt ca_bundle.crt /etc/pki/tls/certs/
sudo cp your_openiam_host.key /etc/pki/tls/private/
```

{% endcode %}
{% endstep %}

{% step %}
**Switch Apache to the SSL config**

The reverse proxy installed in the previous page uses `/etc/httpd/conf.d/mod_openiam.conf` (HTTP). An SSL variant ships with the `mod_openiam` package:

{% code overflow="wrap" %}

```bash
cd /etc/httpd/conf.d
sudo mv mod_openiam.conf mod_openiam.conf_not_used
sudo cp /usr/share/doc/mod_openiam/conf.d/mod_openiam_ssl.conf .
```

{% endcode %}

Edit `mod_openiam_ssl.conf` and point the three directives at your files:

{% code overflow="wrap" %}

```apacheconf
SSLCertificateFile      /etc/pki/tls/certs/your_openiam_host.crt
SSLCertificateKeyFile   /etc/pki/tls/private/your_openiam_host.key
SSLCACertificateFile    /etc/pki/tls/certs/ca_bundle.crt
```

{% endcode %}
{% endstep %}

{% step %}
**Restart and verify**

{% code overflow="wrap" %}

```bash
sudo systemctl restart httpd
curl -I https://<openiam-host>/idp/login
```

{% endcode %}

Ports 80 and 443 were already opened in firewalld by the proxy installer; if you manage the firewall elsewhere, open them there too.
{% endstep %}
{% endstepper %}

## If it failed

| Symptom                        | Likely cause                                                                           |
| ------------------------------ | -------------------------------------------------------------------------------------- |
| httpd won't start              | Key/cert mismatch or wrong paths — `journalctl -u httpd` shows the offending directive |
| Browser warns about the chain  | `SSLCACertificateFile` missing the intermediate bundle                                 |
| 200 on HTTP but nothing on 443 | Old `mod_openiam.conf` still present alongside the SSL one — only one should be active |

## You know this worked when…

{% hint style="success" %}
`https://<openiam-host>/idp/login` loads with a valid certificate in the browser.
{% endhint %}

Next: [Verify health and log in](/getting-started-guide/verify-and-first-login.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/getting-started-guide/enable-https.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
