# Management API authentication

**URL:** <https://openziti.discourse.group/t/management-api-authentication/1480>\
**Category:** Support\
**Created:** [August 11, 2023, 12:25pm UTC](https://openziti.discourse.group/t/management-api-authentication/1480 "2023-08-11T12:25:51Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [August 22, 2023, 3:21pm UTC](https://openziti.discourse.group/t/management-api-authentication/1480/41 "2023-08-22T15:21:52Z")

</div>

@arslane I do think this issue is the same as mentioned in the PSA. To fix your existing environment, as mentioned in that PSA you can run one sed command and a few cat commands:

```auto
sed -i 's#'"${ZITI_PKI}/${ZITI_PKI_CTRL_EDGE_INTERMEDIATE_NAME}/certs/${ZITI_PKI_CTRL_EDGE_INTERMEDIATE_NAME}.cert"'#'"${ZITI_PKI}/${ZITI_PKI_CTRL_EDGE_ROOTCA_NAME}/certs/${ZITI_PKI_CTRL_EDGE_ROOTCA_NAME}.cert"'#g' $ZITI_HOME/$ZITI_NETWORK.yaml

echo "adding controller root CA to ca bundle: $ZITI_PKI/$ZITI_PKI_CTRL_ROOTCA_NAME/certs/$ZITI_PKI_CTRL_ROOTCA_NAME.cert"
cat "$ZITI_PKI/$ZITI_PKI_CTRL_ROOTCA_NAME/certs/$ZITI_PKI_CTRL_ROOTCA_NAME.cert" > "${ZITI_PKI_CTRL_CA}"

echo "adding signing root CA to ca bundle: $ZITI_PKI/$ZITI_PKI_SIGNER_ROOTCA_NAME/certs/$ZITI_PKI_SIGNER_ROOTCA_NAME.cert"
cat "$ZITI_PKI/$ZITI_PKI_SIGNER_ROOTCA_NAME/certs/$ZITI_PKI_SIGNER_ROOTCA_NAME.cert" >>"${ZITI_PKI_CTRL_CA}" >> "${ZITI_PKI_CTRL_CA}"

echo "adding secondary signing intermediate into ca bundle: $ZITI_PKI/$ZITI_PKI_SIGNER_ROOTCA_NAME/certs/${ZITI_PKI_SIGNER_INTERMEDIATE_NAME}_spurious_intermediate.cert"
cat "$ZITI_PKI/$ZITI_PKI_SIGNER_ROOTCA_NAME/certs/${ZITI_PKI_SIGNER_INTERMEDIATE_NAME}_spurious_intermediate.cert" >> "${ZITI_PKI_CTRL_CA}"

sudo systemctl restart ziti-controller

```

This will patch the flawed controller config file, create a new ca bundle, and restart the controller. After that your environment should be back in shape.

---

<div class="post-metadata">

**Author:** ![sabedevops](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/sabedevops/32/552_2.png) [@sabedevops](https://openziti.discourse.group/u/sabedevops)\
**Post date:** [August 24, 2023, 3:14pm UTC](https://openziti.discourse.group/t/management-api-authentication/1480/42 "2023-08-24T15:14:11Z")

</div>

Hey @arslane, just wanted to touch base and see how you are faring?

---

<div class="post-metadata">

**Author:** ![007bond007](https://avatars.discourse-cdn.com/v4/letter/0/3be4f8/32.png) [@007bond007](https://openziti.discourse.group/u/007bond007)\
**Post date:** [June 11, 2025, 2:35pm UTC](https://openziti.discourse.group/t/management-api-authentication/1480/43 "2025-06-11T14:35:58Z")

</div>

Hey @arslane I'm following up to see if you've finished these modules for Ansible and how i'd set them up - this would be very cool stuff for automating a Zero-Trust homelab, I'm slowly getting into the whole Ansible/Taraform/Git CI/CD pipelines and OpenZiti is a tough cookie to crack when it comes to automation so far.

[Previous page](https://openziti.discourse.group/t/management-api-authentication/1480.md?page=2)
