Coder Social home page Coder Social logo

magengit / magen-id Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 414 KB

Identity Server for Magen Data Leak Prevention Software

License: Other

Makefile 0.74% Python 92.26% Batchfile 0.20% CSS 0.71% JavaScript 2.36% HTML 3.08% Shell 0.65%
dlp identity data leak prevention

magen-id's Introduction

Magen ID Service

Build Status codecov Code Health

Magen ID Service is a microservice responsible for authentication and authorization for users to access resources. It exposes REST API for managing client, user, group and token authorization.

Supported key formats: JSON, JWT

Current version: 1.0a2

Git clone

All of Magen services depend on an operations git submodule magen_helper. When cloning this repo, make sure to provide --recursive flag or after the clone execute a command to update magen-helpers git submodule:

git submodule update --init --recursive

For This Service there are available make commands. Makefile is located under id/

Make Default Target: make default. Here is the list of targets available for ID service

default:
        @echo 'Makefile for Magen ID Service'
        @echo
        @echo 'Usage:'
        @echo ' make clean              :Remove packages from system and pyc files'
        @echo ' make test               :Run the test suite'
        @echo ' make package            :Create Python wheel package'
        @echo ' make install            :Install Python wheel package'
        @echo ' make all                :clean->package->install'
        @echo ' make list               :List of All Magen Dependencies'
        @echo ' make build_docker       :Pull Base Docker Image and Current Image'
        @echo ' make run_docker         :Build and Run required Docker containers with mounted source'
        @echo ' make runpkg_docker      :Build and Run required Docker containers with created wheel'
        @echo ' make test_docker        :Build, Start and Run tests inside main Docker container interactively'
        @echo ' make stop_docker        :Stop and Remove All running Docker containers'
        @echo ' make clean_docker       :Remove Docker unused images'
        @echo ' make rm_docker          :Remove All Docker images if no containers running'
        @echo ' make doc                :Generate Sphinx API docs'
        @echo
        @echo

Requirements: MacOS X

  1. python3 -V: Python 3.5.2 (>=3.4)
  2. pip3 -V: pip 9.0.1
  3. make -v: GNU Make 3.81
  4. docker -v: Docker version 17.03.0-ce, build 60ccb22
  5. docker-compose -v: docker-compose version 1.11.2, build dfed245
  6. Make sure you have correct rights to clone Cisco-Magen github organization

Requirements: AWS EC2 Ubuntu

  1. python3 -V: Python 3.5.2
  2. pip3 -V: pip 9.0.1
  3. make -v: GNU Make 4.1
  4. docker -v: Docker version 17.03.0-ce, build 60ccb22
  5. docker-compose -v: docker-compose version 1.11.2, build dfed245
  6. Make sure AWS user and root have correct rights to Cisco-Magen github organization

Targets

  1. make all -> Install Magen-Core dependencies, clean, package and install ks package
  2. make test -> run id tests

Adopt this Infrastructure

  1. get helper_scripts to the repo
  2. follow the structure in docker_ks to create docker-compose.yml and Dockerfile files
  3. use Makefile as an example for building make automation

Sphinx Documentation SetUp

There is a configured Sphinx API docs for the service. To compile docs execute:

make html in docs directory

or run:

make doc in the ingestion directory

#ID SERVICE

  • id/id_service/data/bootstrap.json contains the initial data that you need to run id service.
  • id/id_service/magenid/idsapp/settings.py contains the Issuer url, etc.

##To Run The ID Serivce

  1. Open the bootstrap.json file with your preferred text editor

  2. Add/Remove the User and Group info

  3. Add/Remove items in the connected_apps. A sample connected app has been added. It can be used for running your "id_client_sample". If you change the host/port of the "id_client_sample" then you need to update the url under "redirect_uris". Also, make sure the "id_client_sample" uses the same "client_id", "client_secret".

  4. Open a Terminal. Navigate to the "id" directory, and run the following command:

$ make run_docker

#ID CLIENT SAMPLE

  • id_client_sample/settings.py file contains the id service host url, callbak url, username, etc. Make sure you edit this before your start the client app.

To Run The ID CLIENT SAMPLE

  1. Open a Terminal. Navigate to the "id/id_client_sample_docker" directory, and run the following command:
$ docker-compose up

magen-id's People

Contributors

alenalifar avatar benderscript avatar magengit avatar mizanul-cisco avatar usetheapi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.