Giter Club home page Giter Club logo

orville's Introduction

Open Registry 2

Curent version is 2.0.0-RC2

Running the stand-alone war and making a sample RESTful request

A sample configuration file is available at https://github.com/UniconLabs/orville/blob/master/web/src/main/resources/application.properties. To configure the application, download the file and modify as needed (change idMatch configuration, change database configuration, etc) and put this file into an external file system location e.g. /path/to/config/openregistry.properties

  1. Download the latest release from https://github.com/UniconLabs/orville/releases
  2. Run java -jar orville-{version}.war --spring.config.location=file:/path/to/config/openregistry.properties.
  3. Make an HTTP POST request to http://localhost:8080/v1/sorPeople/test/ with the following test payload:
{
  "sorAttributes": {
    "names": [
      {
        "type": "official",
        "given": "John",
        "family": "Doe"
      }
    ],
    "emailAddresses": [
      {
        "address": "[email protected]",
        "type": "personal"
      }
    ],
    "identifiers": [
      {
        "identifier": "jd76",
        "type": "network"
      }
    ],
    "sponsor": {
      "identifier": "12345",
      "type": "enterprise"
    },
    "roleEnds": "2014-08-04T12:00:00Z"
  }
}

Security

The HTTP Basic Auth security for Orville REST endpoints is enabled by default. Without providing a valid username:password base64 encoded value in HTTP Authorization header while invoking Orville HTTP resources, the server will return an HTTP 401 error code.

The configuration is controlled by the following properties (either in the classpath application.properties or an externalized properties file as described above):

security.user.name=user
security.user.password=user

In the application.properties included in the classpath, username user, and password user is used. Adjust these with more robust username/password values as necessary.

External servlet container deployment

Orville could be built and deployed to external Servlet containers supporting Servlet v3 spec. e.g. Tomcat7+ as a regular war deployment artifact. In order to use this deployment model, first set the SPRING_CONFIG_LOCATION OS environment variable pointing to the orville's externalized properties file e.g. export SPRING_CONFIG_LOCATION=file:/path/to/config/openregistry.properties

To build the war file, from the root of the project just run ./gradlew clean build The resultant war file will be built and available in web/build/libs/ subdirectory. Once it's built, simply deploy it to any Servlet v3 container of choice.

NOTE: Orville external war deployment has been tested in Tomcat 7.0.42

orville's People

Contributors

dima767 avatar scalding avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

orville's Issues

Create a robust shell wrapper for launching Application jar in the embedded mode

And include this script in the distribution archive in bin directory for example. This way it will free users from having to execute long java -jar ... command, will enable the script to be installed as a Linux init.d service or OS X launchd script, etc. This will provide a more production ready operational aspect of the application. Take inspiration from Spring XD starter shell script for example, as at its heart, XD is a Spring Boot app:

https://github.com/spring-projects/spring-xd/blob/master/scripts/xd/xd-singlenode

Implement robust and flexible pipeline configuration framework

So it would be easy for adopters to plug in their own processors into the pipeline or completly construct their own pipeline. Should utilize the features of Spring @Configuration style Java config as well as Spring Boot's @EnableAutoConfiguration framework as well as Spring 4 @Conditional framework. Look into contributing external jars to Orvile's final executable jar by means of Spring Boot's PropertiesLauncher

References:

Implement robust database initialization bootstrap and migration

Currently it relies on the GORM/Hibernate automagic schema update/create logic and hardcoded reference data bootstrap code in the Application class. Need to come up with a more flexible approach to provide generated database DDL/DML scripts or use the Flyaway database migration tool which is supported natively by Spring Boot: http://docs.spring.io/spring-boot/docs/1.0.1.RELEASE/reference/htmlsingle/#howto-use-a-higher-level-database-migration-tool

Implement robust validation processor

This needs to be implemented in its own processor and inserted into the pipeline before the persistence processor so the correct HTTP 400 could be signaled to REST resource implementation if any of the GORM validations fail

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.