Part 1 - Creating a password page template

Overview

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.

Choosing 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)

  • in one specific space (space template)

Our goal is to end up with a Scaffolding form similar to the following.

This is a simple 2x2 table that uses the following macros

The Report Info macro

  • uses the page:title key to return the current page's title

The Text Data macro

  • is given the name of system_credentials

The Secure macro with the title Credentials is inserted into the Text Data macro.

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. This is 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;"> <colgroup> <col/> <col/> </colgroup> <tbody> <tr> <th>System Name</th> <td> <div class="content-wrapper"> <p> <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> </ac:structured-macro> </p> </div> </td> </tr> <tr> <th>System Credentials</th> <td> <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:rich-text-body> <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> <ac:rich-text-body> <span class="sec-icon-lock icon16"> </span> <pre class="secret">-----BEGIN PGP MESSAGE----- Version: OpenPGP.js v1.6.2 Comment: http://openpgpjs.org wcBMA3bV0uRK5oD/Agf+OZyTt2Lam6x6UCs8DqNLKIBeAxz3OAc0JdbTnb6N 7qmqkF4JLSazW+XWHttBxus1jTBecNQSjMKDfwdrw1VCNdBibX8DEUpeb/G+ Z6yzu/nJtezwz/WZMkMp81nGX5ELEiDqOMPu1J50rPG8GqLmDY2rvB904g3O PUOMraJxk0aJGMf6BCmHMgVhDCxbWGE6TAAJOilro1Ng7TplJXeon/36mUNw 5XWiW2dvGb8kWJHzccUZjF++aXHWMJ7ccl7vjQjUT75NAi8dzt/w7IsS42le e2NnBAXTpxFKKwnq3nW9GIap0k4x5riPd4BUmM45Oj0ZvrRjyf92EVlRzorE q9LAwAEiFQpkPe8vczMLj8Z/oRJMTiIRTD6FV2xRCi+hxx8xax0BDDzR1Rdt /iv6rfn+qlj3jsfDIpgUMMOMPajnmSS0NIDPacaehQwlQBp57xR1f8YUHHyt trNSPRZTKL6Czcw0SXGW4X5e1Eun4zyo4ybFbZ9aX+l18eMMZA62lRw4KhPa kPOMGVL7OFtB6S+sUOOCVwD/kWMiggv9JDIEudQTbGKj+WAjVl4UowfQHgTM MG4yJQofNNezdl8Ljw2o12sRQyn15NT4ASIuMBR35aTNF6AYbZjvK7rjrqJ5 3jvkRc6LM6JgY/8z2lQ0oWib8kz+qQZ5YwtfOTwxCINK/NKc9tLzmhOAC5Y9 5/fNBJ2JS+f1QEsMPZWICDfRnjP85I+fNMQhp7bgbiIbJ5ZpiE1CemRE8tWe z7huCGhoavRnHE8HDtcZWPC8zKs2rj8z1ePZ1vuFaQb2nk1sIGEmqqdhnCdD 3tctAk3prI+zWh29W61DMMt51nRNMuvJnzXgDg== =x2/L -----END PGP MESSAGE----- </pre>Secured content</ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </div> </td> </tr> </tbody> </table>

 

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.

Next

https://appfire.atlassian.net/wiki/spaces/USECASES/pages/478511688