com.hotels.road:road-security

Common classes for security operation and access control

License

License

Categories

Categories

Security
GroupId

GroupId

com.hotels.road
ArtifactId

ArtifactId

road-security
Last Version

Last Version

6.0.21
Release Date

Release Date

Type

Type

jar
Description

Description

Common classes for security operation and access control
Project Organization

Project Organization

Hotels.com (Data Platform Team)

Download road-security

How to add to project

<!-- https://jarcasting.com/artifacts/com.hotels.road/road-security/ -->
<dependency>
    <groupId>com.hotels.road</groupId>
    <artifactId>road-security</artifactId>
    <version>6.0.21</version>
</dependency>
// https://jarcasting.com/artifacts/com.hotels.road/road-security/
implementation 'com.hotels.road:road-security:6.0.21'
// https://jarcasting.com/artifacts/com.hotels.road/road-security/
implementation ("com.hotels.road:road-security:6.0.21")
'com.hotels.road:road-security:jar:6.0.21'
<dependency org="com.hotels.road" name="road-security" rev="6.0.21">
  <artifact name="road-security" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.hotels.road', module='road-security', version='6.0.21')
)
libraryDependencies += "com.hotels.road" % "road-security" % "6.0.21"
[com.hotels.road/road-security "6.0.21"]

Dependencies

compile (16)

Group / Artifact Type Version
com.hotels.road : road-model-rest jar 6.0.21
commons-net : commons-net jar 3.6
com.google.guava : guava jar 23.0
io.micrometer : micrometer-core jar
org.apache.tomcat.embed : tomcat-embed-core jar
org.slf4j : slf4j-api jar 1.7.25
org.springframework : spring-context jar
org.springframework : spring-web jar
org.springframework.ldap : spring-ldap-core jar
org.springframework.security : spring-security-ldap jar
org.springframework.boot : spring-boot-actuator-autoconfigure jar
org.springframework.boot : spring-boot-starter-web jar
org.springframework.boot : spring-boot-starter-security jar
org.springframework.session : spring-session-hazelcast jar
com.hazelcast : hazelcast jar
com.hazelcast : hazelcast-kubernetes jar 1.3.1

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar

test (4)

Group / Artifact Type Version
org.mockito : mockito-core jar 2.8.47
junit : junit jar
org.hamcrest : hamcrest-library jar
ch.qos.logback : logback-classic jar 1.2.2

Project Modules

There are no modules declared in this project.

Data Highway

Start using

Maven Central GitHub license Build Coverage Status

Overview

What is Data Highway?

The Data Highway is a service that allows data to be easily produced and consumed via JSON messages over HTTPS/WSS. Data is first defined using a schema and a "road" is created which will accept messages that conform to this schema. Producers of data sets thus only need to define the structure of their data and are then able to send their data to a REST endpoint and not be concerned with what happens next. Data Highway will ensure that this data is made available for streaming consumption and also stored reliably in a "data lake" in the cloud for access by end users.

Architecture

Data Highway Architecture

Paver

Paver is Data Highway's administration endpoint. It provides the following features:

  • Road (Synonymous with Kafka topic) creation.
  • Schema registration and (soft) deletion.
  • Data-at-rest to Hive/S3 configuration.
  • Road-level producer and consumer authorisation.
Onramp

Onramp is Data Highway's producer endpoint. It allows users to submit messages to roads in JSON format over HTTPS.

Offramp

Offramp is Data Highway's consumer endpoint. It allows users to consume message from roads in JSON format over WSS.

Tollbooth

Tollbooth is the core of Data Highway. It provides the mechanism by which mutations to a road's model are persisted. Mutations can come from users (Paver) or internal agents. Anything wishing to make a mutation submit's a JSON Patch onto a deltas Kafka topic. Tollbooth consumes this topic, continuously applying patches to models and persisting them back onto the main Model (compact) topic.

Traffic Control

Traffic Control is the Kafka Agent. It is primarily responsible for managing Kafka topics in response to changes in models.

Loading Bay / Truck Park

Loading Bay is responsible for orchestrating the landing of data to S3 on a configured interval and managing Hive tables - creation, schema mutation and the addition of partitions.

Try it out

Try Test Drive, an in-memory version of Data Highway that exposes all the public facing endpoints in a single Spring Boot application or Docker container.

docker run -p 8080:8080 hotelsdotcom/road-test-drive:<tag>

Examples

Using a local instance of Test Drive, try creating road, registering a schema and producing and consuming messages using the build in user account user:pass.

Note: For the example below, cURL will prompt for a password which is pass.

Create a road

curl -sk \
  -u user \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "name": "my_road", 
  "description": "My Road",
  "teamName": "TEAM", 
  "contactEmail": "[email protected]",
  "partitionPath": "$.foo",
  "enabled": true,
  "authorisation": {
    "onramp": {
      "cidrBlocks": ["0.0.0.0/0"],
      "authorities": ["*"]
    },
    "offramp": {
      "authorities": {
        "*": ["PUBLIC"]
      }
    }
  }
}' https://localhost:8080/paver/v1/roads

Register a schema

curl -sk \
  -u user\
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "type" : "record",
  "name" : "my_record",
  "fields" : [
    {"name":"foo","type":"string"},
    {"name":"bar","type":"string"}
  ]
}' https://localhost:8080/paver/v1/roads/my_road/schemas

Produce messages

curl -sk \
  -u user\
  -H "Content-Type: application/json" \
  -d '[{"foo":"foo1","bar":"bar1"}]' \
  https://localhost:8080/onramp/v1/roads/my_road/messages

Consume messages

echo '{"type":"REQUEST","count":1}' |\
  websocat -nk wss://localhost:8080/offramp/v2/roads/my_road/streams/my_stream/messages?defaultOffset=EARLIEST

See: websocat

Building

Build and load docker images to the local docker daemon:

mvn clean package -Djib.goal=dockerBuild

Build without docker images:

mvn clean package -Djib.skip

Build and push docker images to a repo:

mvn clean package -Ddocker.repo=my.docker.repo

Contributors

Special thanks to the following for making data-highway possible!

Dave Maughan
Dave Maughan

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ“–
James Grant
James Grant

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ“– ๐Ÿ“ข
Elliot West
Elliot West

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ“– ๐Ÿ“ข
Adrian Woodhead
Adrian Woodhead

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ“–
Konrad Dowgird
Konrad Dowgird

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ“–
Riccardo Freixo
Riccardo Freixo

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ“– ๐Ÿš‡
Monica Nicoara
Monica Nicoara

๐Ÿค” ๐Ÿ“‹
Kyriakos Sideris
Kyriakos Sideris

๐Ÿ’ป
Sandeep Solanki
Sandeep Solanki

๐Ÿ’ป

This project follows the all-contributors specification.

Legal

This project is available under the Apache 2.0 License.

Copyright 2019 Expedia, Inc.

com.hotels.road

Hotels.com

Hotels.com open source contributions

Versions

Version
6.0.21
6.0.20
6.0.18
6.0.17
6.0.16
6.0.15
6.0.14
6.0.13
6.0.12
6.0.11
6.0.10
6.0.9
6.0.8
6.0.7
6.0.6
6.0.5
6.0.4
6.0.3
6.0.2
6.0.1