Skip to content

TrustAndIdentityServices/aegis-client-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Aegis. Aegis is divided into following maven projects, each with its own GIT repository :

aegis-client-java - This project. Meant for Integrators of Aegis enforcement engine - eg 
             developers wanting to incorporate Aegis enforcement to define and
             enforce policies in their own apps.
aegis-core - Provides the core engine source and tests.
             Use this project if you are a Contributor to the Aegis core
aegis-raptor -  Provides Raptor integration. Meant for Raptor developers
             wanting to incorporate Aegis functionality for their raptor apps.

Eclipse Instructions:
======================
Prerequisites :
 Install Eclipse classic or equivalent
 Download and install Maven Eclispse plugin :
     Maven Integration for Eclipse and Maven Integration for Eclipse WTP.
 [Optional] Download & install EGit plugin from: http://eclipse.org/egit/

1) Clone the aegis-client-java to a local directory.
   To do this, you can either :
    - Install the GIT plugin in eclipse and use its GIT Explorer feature 
      to clone the GIT repository to your local directory
      [Note : Do not create a GIT project in Eclipse as yet]
    OR
    - Execute the git command  on a terminal window. Eg:
        git clone <repository>
 
2) Create a Eclipse Maven Project
   (a) Start Eclipse and select File->Import...
   (b) select "Maven->Maven Project" (if maven is missing....)
   (c) "Import" dialog : Select "Existing Maven Projects"
      "Select maven projects" dialog- Click "Browse.." and naviagte to
      the directory containing pom.xml starting with the GIT repository
      cloned in step 1 (eg aegis-client-java).
3) Build and run tests :
   Select root of the eclipse project - execute "Run As..." -> 'maven test' 

4a) Test drive Java SE samples : Standalone Java appl :Execute AegisSample :
   Navigate to samples
   Execute Run As... -> Java Application.

4b) Test drive JavaEE samples : web application : 
   Execute mvn jetty:run to start a jetty server - and then invoke http://localhost:8080/index.jsp in a  browser
   OR
   Deploy target/aegis*.war in a Java app server (eg Tomcat) - and invoke : http://<host>:<port>/<deploy>/index.jsp in a browser
   The wizard will guide thru the next steps, which involve :
      - Setting up bootstrap info in a local directory
      - Creating up a sample session (simple cookie)
      - Protecting a webcmd app in 2 modes : direct invocation of Aegis PEP within the app or via a servlet Filter
       

Dependencies:
==============
The project needs aegis-core, JUnit and JSON jars.
json.jar and junit-4.10.jar are through maven. You do not need to do anything.
At this point -aegis-core dependency is met locally - so you must install aegis-core maven locally.
TODO : Add aegis-core to managed maven.

Directory structure:
====================

src/main/java/ : contains source files of samples
src/main/java/samples/CustomEvaluator : contains source files of Aegis plugins
src/main/java/samples/filter : contains source file of a servlet filter based PEP
src/test/java : Junit test
src/main/resources/ : Properties file used by the samples

CLI commands To build and run:
==============================

Navigate to directory containing pom.xml
#cd <gitdir>/aegis-client-java

Execute tests
# mvn test

# Cleanup
# mvn clean
 
# Jetty
# mvn jetty:run

About

Aegis - PEF Java Client Samples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages