Files
truecharts/charts/enterprise/vaultwarden/docs/disable-admin-page-guide.md
T
Stavros KoisandGitHub 12b5c56b24 chore(docs): lints some docs, uses front-matter instead of # h1, and fix list items in changelog (#16589)
**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

front matter is supported by all doc sites (including github markdown
rendering
and is easier to add extra metadata later on, if we want to.

```
---
title: sometitle
---
```

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
2023-12-31 16:24:05 +02:00

2.1 KiB

title
title
Disabling the Admin Interface

:::caution Backup Reminder

Before proceeding, ensure that you have backed up important configurations, especially when making changes to configuration files or secrets. It's also advisable to back up the Vaultwarden database to prevent potential data loss.

:::

This guide is a combination of the upstream documentation and how we implemented it.

Modify the Host Secret

To start with the deactivation, you must first modify the secret on the host's shell. Execute the following command:

k3s kubectl patch secret vaultwarden-vaultwardensecret -n ix-vaultwarden --type='json' -p='[{"op": "remove", "path": "/data/ADMIN_TOKEN"}]'

:::info Command Explanation

The command above utilizes kubectl, a command-line tool for interacting with Kubernetes clusters. Here's a breakdown:

  • k3s: This is a lightweight version of Kubernetes.
  • patch secret vaultwarden-vaultwardensecret: This indicates that we are patching (modifying) the secret named vaultwarden-vaultwardensecret.
  • -n ix-vaultwarden: This specifies the namespace (ix-vaultwarden) in which the secret resides.
  • --type='json': Specifies that the patch content is of type JSON.
  • -p='[{"op": "remove", "path": "/data/ADMIN_TOKEN"}]': This JSON patch instruction tells Kubernetes to remove the ADMIN_TOKEN field from the secret.

:::

Update Container Config

Next, while inside the Vaultwarden container, run the command below to modify the config.json file:

sed -i.bak '/admin_token/d' /data/config.json

:::info Command Explanation

  • The sed command is used to search and delete the line containing admin_token from the config.json file.
  • A backup of the original config.json is created with the .bak extension before making the change.

:::

Adjust the App Configuration

Finally, head to the Vaultwarden app's configuration:

  1. Find and disable the admin interface option (if it is still enabled).
  2. Click "Save" at the bottom to apply the changes.