Before we can create a Password Manager page, we'll need every Confluence user to standardize the way they store their passwords or secrets. A great way to do that would be to use Scaffolding's Live Template's feature.

After the Live Template has been created, any Confluence user who wants to use Confluence to store their passwords or secrets can create a new page using the Live Template.

Step 1 

Let's start with creating a Secrets page template using Scaffolding's Live Template macro. This template can be created as a global template or a space template. Whether you choose to create a global or space template depends on if you allow your Confluence users to create pages to store passwords or secrets in any space (global template) or in one specific space (space template).

Our goal is to end up with a Scaffolding form that looks like this:

As you can see, it's quite a straightforward 2x2 table which uses only a Reporting macro (Report Info), a Scaffolding macro (Text Data), and a Security and Encryption macro (Secure).

The Report Info uses the page:title key to return the current page's title.

The Text Data macro is given the name of system_credentials.

Within the Text Data macro is inserted a Secure macro with the title Credentials.

Make sure to save this template and give it an easy-to-remember name such as "Password Page Template" or "Secrets Template".

Source code

The following source code is shared using Confluence Storage Format, the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article:

  • How do I use Recipes that use the Storage Format with the Confluence Source Editor?

    Secrets Template - Storage Format

    <table class="wrapped" style="letter-spacing: 0.0px;">
          <th>System Name</th>
            <div class="content-wrapper">
                <ac:structured-macro ac:macro-id="12c8c491-c0e4-405a-b361-482e34cd6f1e" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="">page:title</ac:parameter>
          <th>System Credentials</th>
            <div class="content-wrapper">
              <ac:structured-macro ac:macro-id="2c3d5c16-49f9-4ba4-99ee-1757208f194a" ac:name="text-data" ac:schema-version="1">
                <ac:parameter ac:name="name">system_credentials</ac:parameter>
                <ac:parameter ac:name="type">line</ac:parameter>
                <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                  <ac:structured-macro ac:macro-id="190e130e-f3f9-4da5-acac-f99bd4ba1a84" ac:name="secure" ac:schema-version="1">
                    <ac:parameter ac:name="title">Credentials</ac:parameter>
                      <span class="sec-icon-lock icon16"> </span>
                      <pre class="secret">-----BEGIN PGP MESSAGE-----
    Version: OpenPGP.js v1.6.2
    -----END PGP MESSAGE-----
    </pre>Secured content</ac:rich-text-body>

Step 2

Now, when your users need to create a page where they are required to share passwords, they must use the Live Template you created, by creating a new page and using the Live Template macro with the template you created.