Skip to end of banner
Go to start of banner

Part 2 - Creating the password manager page

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Now that we have a standard Passwords Page Live Template that any user on your Confluence can use, you can now pull all these pages together in one convenient place using the power of Reporting.

Putting the parts together

Let's get on to the fun part!

Using Reporting, we can build a Report Table macro with as many columns as we want information.

For this example, let's start with creating a Local Reporter macro and then, using the Text Filter macro, we filter the results to show pages that used the Live Template macro we created in the previous step.

From there it's just a matter of creating new table columns with Report Column macros for each item you want to report on from the returned page.

For this example, we want to return reports on the page name, the category, the credentials (gleaned from Security and Encryption's Secure macro combined with Scaffolding's Data Supplier from the Live Template we created in the previous step), the page creator, created date, the page modifier, and modified date. All these data can be retrieved using keys found in the Page Supplier.

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:

Secrets Manager - Storage Format
<ac:layout>
  <ac:layout-section ac:type="two_right_sidebar">
    <ac:layout-cell>
      <ac:structured-macro ac:macro-id="63ff6346-5059-4c8f-8600-e30f1de1367e" ac:name="report-table" ac:schema-version="1">
        <ac:rich-text-body>
          <ac:structured-macro ac:macro-id="473bd200-82bd-4478-98d4-c516cf3ffc74" ac:name="local-reporter" ac:schema-version="1">
            <ac:parameter ac:name="">page:descendents</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="5ccb75c3-2c6b-452e-bac0-72d181de172d" ac:name="text-filter" ac:schema-version="1">
                  <ac:parameter ac:name="required">true</ac:parameter>
                  <ac:parameter ac:name="">data:system_credentials</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="e1589aa3-e5b1-4bae-9694-27e5e333adff" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">System Name</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="9a25514b-20c5-4016-854e-ebefc7eb5579" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="link">true</ac:parameter>
                  <ac:parameter ac:name="">page:title</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="4a7581f8-907e-47af-8025-b8c903f96a58" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Category</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="a3eae37f-7574-408c-9f9c-4450255f93dc" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="">page:parent&gt;page:title</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="9cfe229e-1358-41e3-a003-9e391a4860a0" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">System Credentials</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="a6cc9308-cbfc-404e-b549-dfe8933db219" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="render">richtext</ac:parameter>
                  <ac:parameter ac:name="">data:system_credentials</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="602f1de1-0b2d-49fe-bd06-9c2d02557833" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Creator</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="ff7c9d68-0d56-498f-b279-77e48cbcb774" ac:name="report-image" ac:schema-version="1">
                  <ac:parameter ac:name="width">32px</ac:parameter>
                  <ac:parameter ac:name="height">32px</ac:parameter>
                  <ac:parameter ac:name="">page:creator &gt; user:picture</ac:parameter>
                </ac:structured-macro>
                <ac:structured-macro ac:macro-id="f3e8303c-f2b9-4493-b4c5-879338d1cf5b" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="link">true</ac:parameter>
                  <ac:parameter ac:name="">page:creator</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="b9d27803-0afd-4676-91a7-c345bd4c4ae4" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Created Date</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="4da8160b-94f1-47ee-9769-5e8e65afd932" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="format">MMM dd, yyyy (HH:mm:ss)</ac:parameter>
                  <ac:parameter ac:name="">page:creation date</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="1c5b2d1f-15d9-41f5-b22b-985efffc90cc" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Modifier</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="c463d37f-d327-481f-bb1e-3e51ed6f72fe" ac:name="report-image" ac:schema-version="1">
                  <ac:parameter ac:name="width">32px</ac:parameter>
                  <ac:parameter ac:name="height">32px</ac:parameter>
                  <ac:parameter ac:name="">page:modifier &gt; user:picture</ac:parameter>
                </ac:structured-macro>
                <ac:structured-macro ac:macro-id="e1994e8f-a6a1-452b-a5f6-56587ad71538" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="link">true</ac:parameter>
                  <ac:parameter ac:name="">page:modifier</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <ac:structured-macro ac:macro-id="3840dd8e-f78b-4d61-bd91-6bf277c6f626" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Last Modified</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="cb2a940f-20af-4516-9952-a29d63e1e105" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="format">MMM dd, yyyy (HH:mm:ss)</ac:parameter>
                  <ac:parameter ac:name="">page:modification date</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
        </ac:rich-text-body>
      </ac:structured-macro>
    </ac:layout-cell>
    <ac:layout-cell>
      <h2>Logins</h2>
      <hr/>
      <ac:structured-macro ac:macro-id="9ecdcabb-5db0-4bc0-9c1c-735eb1d08660" ac:name="info" ac:schema-version="1">
        <ac:rich-text-body>
          <p>For demo purposes, you may use the following credentials to login and to decrypt the credentials on this page.</p>
        </ac:rich-text-body>
      </ac:structured-macro>
      <p>
        <br/>
        <ac:structured-macro ac:macro-id="047a2068-b835-46f6-a129-46af754de85d" ac:name="showcase" ac:schema-version="1">
          <ac:parameter ac:name="button-link">https://demo.servicerocket.io?os_username=demo.admin&amp;os_password=demo.admin</ac:parameter>
          <ac:parameter ac:name="button-text">Quick login</ac:parameter>
          <ac:parameter ac:name="description">Username: demo.admin / Password: demo.admin</ac:parameter>
          <ac:parameter ac:name="title">Login as space admin</ac:parameter>
        </ac:structured-macro>
      </p>
      <p>
        <ac:structured-macro ac:macro-id="76d31a83-cf66-47d1-a74c-19ccc64576ac" ac:name="showcase" ac:schema-version="1">
          <ac:parameter ac:name="button-link">https://demo.servicerocket.io?os_username=demo.user&amp;os_password=demo.user</ac:parameter>
          <ac:parameter ac:name="button-text">Quick login</ac:parameter>
          <ac:parameter ac:name="description">Username: demo.user / Password: demo.user</ac:parameter>
          <ac:parameter ac:name="title">Login as user</ac:parameter>
        </ac:structured-macro>
      </p>
    </ac:layout-cell>
  </ac:layout-section>
</ac:layout>
  • No labels