Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Latest commit

 

History

History
139 lines (87 loc) · 3.66 KB

README.md

File metadata and controls

139 lines (87 loc) · 3.66 KB

Codacy Badge

Janssen Command Line Interface

jans-cli is a Command Line Interface for Janssen Configuration. It also has menu-driven interface that makes it easier to understand how to use Janssen Server through the Interactive Mode.

Table of Contents

Installation

You can directly download the jans-cli package file as below:

For macOs:

wget https://github.com/JanssenProject/jans-cli/releases/latest/download/jans-cli-macos-amd64.pyz

for linux:

wget https://github.com/JanssenProject/jans-cli/releases/latest/download/jans-cli-linux-amd64.pyz

Build jans-cli.pyz manually

If you would like to build jans-cli manually, you can go through the following steps noted here:

Prerequisites

  1. git
  2. Python 3.6+.
  3. Python pip3 package.

Downloading jans-cli files

  1. Clone the repository:

    git clone https://github.com/JanssenProject/jans-cli/
    
  2. open directory

    cd jans-cli
    

Standard Python package

  1. Create virtual environment and activate:

    python3 -m venv .venv
    source .venv/bin/activate
  2. Install the package:

    make install
    

    This command will install executable called jans-cli available in virtual environment PATH.

Python zipapp

  1. Install shiv using pip3:

    pip3 install shiv
  2. Install the package:

    make zipapp

    This command will generate executable called jans-cli.pyz under the same directory.

You can verify with the following command line if everything is done successfully.

python3 jans-cli.pyz -h

Virtual Machine Setup

jans-cli is automatically installed if you choose jans-config-api during Janssen Server Installation on Virtual Machine.

After successfully installed Janssen Server, you will get two command-line arguments as below:

Quick Start

As you have seen, CLI supports both of the config-cli and scim-cli. For a quick start, let's run the following command.

/opt/jans/jans-cli/config-cli.py

If you get an error, you can try in this way:

python3 /opt/jans/jans-cli/config-cli.py

Alternatively, you can make python3 to default version:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
/opt/jans/jans-cli/config-cli.py

You will get a menu as below image:

main-menu.png

From the following list, you can choose any options by selecting its number. For example, let's say number 2, to get Default Authentication Method.

That returns another two options as below:

option-2-option.png

Now selecting 1 and it returns our desired result as below image:

default-authentication-method.png

So, That was a quick start to view how this jans-cli Interactive Mode works. Please, follow this link to read the jans-cli docs for a better understanding of the Janssen Command-Line.