You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2022/07/24 22:13:13 UTC

[directory-site] 01/02: + CLI

This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-site.git

commit fa7d7d8d83b6bcc386287c63f8230006223c8f48
Author: Shawn McKinney <sm...@symas.com>
AuthorDate: Sun Jul 24 15:27:05 2022 -0500

    + CLI
---
 source/fortress/cli.md        | 68 +++++++++++++++++++++++++++++++++++++++++++
 source/fortress/user-guide.md |  5 ++--
 2 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/source/fortress/cli.md b/source/fortress/cli.md
new file mode 100644
index 00000000..88e560e7
--- /dev/null
+++ b/source/fortress/cli.md
@@ -0,0 +1,68 @@
+---
+title: Command Line Inteface
+---
+
+# Fortress Command Line Interface
+
+Useful for ad-hoc administration enabling administrators to perform CRUD and testing on policy data.
+
+## Use cases supported
+
+* Create, Read, Update, Delete policies 
+* Testing of policies
+
+## Instructions to run the Apache Fortress Command Line Interpreter (CLI)
+
+The CLI is useful for ad-hoc policy administration in runtime environments.
+
+1. From **FORTRESS_HOME** enter the following command:
+
+    ```bash
+    mvn -Pcli test
+    ```
+
+2. Which starts the Fortress command line interpreter:
+
+    ```
+    CommandLineInterpreter:176 - Startup to interactive mode success...
+    CommandLineInterpreter:183 - CLI function groups include admin, review, system, dadmin, group
+    CommandLineInterpreter:185 - Enter one from above or 'q' to quit
+    ```
+
+3. Where subsequent commands can be performed.  For example to add a new user:
+
+    ```bash
+    admin auser -u testuser1 -p mypasword123 -o dev1
+    CommandLineInterpreter:1078 - arg:admin
+    CommandLineInterpreter:1078 - arg:auser
+    CommandLineInterpreter:1078 - arg:-u
+    CommandLineInterpreter:1078 - arg:testuser1
+    CommandLineInterpreter:1078 - arg:-p
+    CommandLineInterpreter:1078 - arg:-o
+    CommandLineInterpreter:1078 - arg:dev1
+    CommandLineInterpreter:487 - auser
+    CommandLineInterpreter:683 - command:auser was successful
+    CommandLineInterpreter:183 - CLI function groups include admin, review, system, dadmin, group
+    CommandLineInterpreter:185 - Enter one from above or 'q' to quit
+    ```
+
+4. Or to interrogate users:
+
+    ```bash
+    review fuser -u testuser1
+    CommandLineInterpreter:1078 - arg:review
+    CommandLineInterpreter:1078 - arg:fuser
+    CommandLineInterpreter:1078 - arg:-u
+    CommandLineInterpreter:1078 - arg:testuser1
+    CommandLineInterpreter:713 - fuser
+    CommandLineInterpreter:1443 - U   CTR  [0]
+    CommandLineInterpreter:1443 - U   UID  [testuser1]
+    CommandLineInterpreter:1443 - U   IID  [20ef2dfd-0b86-41a5-87d6-f7081e455d76]
+    CommandLineInterpreter:1443 - U   CN   [testuser1]
+    CommandLineInterpreter:1443 - U   DESC [null]
+    CommandLineInterpreter:1443 - U   OU   [dev1]
+    CommandLineInterpreter:1443 - U   SN   [testuser1]
+    ```
+
+5. Perform any of the other APIs as a shell program, follow instructions in the command line interpreter reference manual:
+* [CLI Reference](https://nightlies.apache.org/directory/fortress/2.0.8/apidocs/org/apache/directory/fortress/core/cli/package-summary.html)
diff --git a/source/fortress/user-guide.md b/source/fortress/user-guide.md
index 6e8c17f1..ffbc6f3b 100644
--- a/source/fortress/user-guide.md
+++ b/source/fortress/user-guide.md
@@ -8,14 +8,15 @@ This guide is primarily for people new to Fortress.
 
 ## Table of contents
 
-* [1 - An Introduction to Role-Based Access Control ANSI INCITS 359-2004](user-guide/1-intro-rbac.html)
+* [An Introduction to Role-Based Access Control ANSI INCITS 359-2004](user-guide/1-intro-rbac.html)
     * [1.1 - ANSI RBAC Explained](user-guide/1.1-rbac-explained.html)
     * [1.2 - What ANSI RBAC is not](user-guide/1.2-what-is-not-rbac.html)
     * [1.3 - What ANSI RBAC is](user-guide/1.3-what-rbac-is.html)
     * [1.4 - Why is ANSI RBAC Important?](user-guide/1.4-why-rbac-is-important.html)
     * [1.5 - How to implement ANSI RBAC](user-guide/1.5-how-to-impl-rbac.html)
     * [1.6 - Where to go for more info](user-guide/1.6-go-for-more.html)
-* [2 - Multitenancy Overview](user-guide/2-multitenancy.html)
+* [Multitenancy Overview](user-guide/2-multitenancy.html)
   * [2.1 - Fortress Multitenancy](user-guide/2.1-fortress-multitenancy.html)
   * [2.2 - Traditional Multi-Instances architecture](user-guide/2.2-tradi-multi-instances.html)
   * [2.3 - Multitenancy under the covers](user-guide/2.3-multitenancy-under-covers.html)
+* [Command Line Interface](cli.html)