Fullstop -- Violation-Sink with Reactor

Fullstop parent -- Audit reporting application

License

License

Categories

Categories

React User Interface Web Frameworks Reactor Container Microservices Reactive libraries
GroupId

GroupId

org.zalando.stups
ArtifactId

ArtifactId

fullstop-violation-sink-reactor
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Fullstop -- Violation-Sink with Reactor
Fullstop parent -- Audit reporting application
Project Organization

Project Organization

Zalando SE

Download fullstop-violation-sink-reactor

How to add to project

<!-- https://jarcasting.com/artifacts/org.zalando.stups/fullstop-violation-sink-reactor/ -->
<dependency>
    <groupId>org.zalando.stups</groupId>
    <artifactId>fullstop-violation-sink-reactor</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.zalando.stups/fullstop-violation-sink-reactor/
implementation 'org.zalando.stups:fullstop-violation-sink-reactor:1.1.0'
// https://jarcasting.com/artifacts/org.zalando.stups/fullstop-violation-sink-reactor/
implementation ("org.zalando.stups:fullstop-violation-sink-reactor:1.1.0")
'org.zalando.stups:fullstop-violation-sink-reactor:jar:1.1.0'
<dependency org="org.zalando.stups" name="fullstop-violation-sink-reactor" rev="1.1.0">
  <artifact name="fullstop-violation-sink-reactor" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.zalando.stups', module='fullstop-violation-sink-reactor', version='1.1.0')
)
libraryDependencies += "org.zalando.stups" % "fullstop-violation-sink-reactor" % "1.1.0"
[org.zalando.stups/fullstop-violation-sink-reactor "1.1.0"]

Dependencies

compile (5)

Group / Artifact Type Version
org.zalando.stups : fullstop-violation-api jar 1.1.0
io.projectreactor : reactor-bus jar 2.0.3.RELEASE
org.springframework.boot : spring-boot-actuator jar
org.springframework.boot : spring-boot-autoconfigure jar
org.slf4j : slf4j-api jar

test (7)

Group / Artifact Type Version
org.slf4j : slf4j-log4j12 jar
log4j : log4j jar
org.springframework : spring-test jar
org.springframework.boot : spring-boot-starter-test jar
org.springframework.boot : spring-boot-starter-web jar
junit : junit jar
org.assertj : assertj-core jar 3.1.0

Project Modules

There are no modules declared in this project.

Hex.pm Build Status codecov.io swagger-editor Issues in progress Join the chat at https://gitter.im/zalando-stups/fullstop

swagger-validator

Fullstop - Audit reporting

Fullstop AWS overview

Fullstop

Fullstop Architecture overview

Fullstop Architecture

Aim of the project is to enrich CloudTrail log events.

In our scenario we have multiple AWS accounts that need to be handled.

Each of this account has CloudTrail activated and is configured to write in a bucket that resides in the account where also fullstop is running. (Right now in AWS it's not possible to read CloudTrail logs from a different account)

Fullstop will then process events collected from CloudTrail.

To enrich CloudTrail log events with information that comes from other systems than AWS, we should only configure fullstop to do so.

Fullstop can even call the AWS API of a different account, by using a cross-account role. The account that is running fullstop should therefore be trusted by all other accounts in order to perform this operations.

Fullstop-Cross-Account-Role

Plugins

Jobs

In addition to listening on cloudtrail events, Fullstop. runs jobs as well. A list of jobs can be found here.

Application lifecycle

Fullstop. also keeps record of your application lifecycles. for more information, see the [fullstop-application-lifecycle-plugin] (fullstop-plugins/fullstop-application-lifecycle-plugin) and the Application lifecycle API

Information sources

Fullstop uses different source to gather information.

information-sources

Configuration

This environment variables should be set:

FULLSTOP_LOGS
FULLSTOP_SQS_URL
FULLSTOP_SQS_REGION
FULLSTOP_S3_REGION
FULLSTOP_TAUPAGE_OWNERS
FULLSTOP_TAUPAGE_NAME_PREFIX
FULLSTOP_S3_BUCKET
FULLSTOP_KIO_URL
FULLSTOP_PIERONE_URLS
FULLSTOP_TEAM_SERVICE_URL
DATABASE_URL
DATABASE_USER
DATABASE_PASSWORD
DATABASE_DRIVER
INSTANCE_LOGS_S3_BUCKET
ACCESS_TOKEN_URI
CREDENTIALS_DIR
TOKEN_INFO_URI
FULLSTOP_UNAPPROVED_SERVICES_AND_ROLE_BUCKET_NAME
FULLSTOP_UNAPPROVED_SERVICES_AND_ROLE_PREFIX

Example:

$ export FULLSTOP_LOGS=/fullstop_logs_dir
$ export FULLSTOP_SQS_URL=https://sqs.eu-central-1.amazonaws.com/ACCOUNT_ID/fullstop
$ export FULLSTOP_SQS_REGION=eu-central-1
$ export FULLSTOP_S3_REGION=eu-west-1
$ export FULLSTOP_TAUPAGE_OWNERS=999999999999
$ export FULLSTOP_TAUPAGE_NAME_PREFIX=Taupage
$ export FULLSTOP_S3_BUCKET=fullstop-bucket
$ export FULLSTOP_KIO_URL: https://application.registry.address
$ export FULLSTOP_PIERONE_URLS: https://docker.repository.address
$ export FULLSTOP_TEAM_SERVICE_URL: https://team.service.address
$ export DATABASE_URL='jdbc:postgresql://localhost:5432/fullstop'
$ export DATABASE_USER=postgres
$ export DATABASE_PASSWORD='{cipher}234laksnfdlF83NHALF'
$ export DATABASE_DRIVER=org.postgresql.Driver
$ export INSTANCE_LOGS_S3_BUCKET=my-s3-bucket
$ export ACCESS_TOKEN_URI=accessTokenUri
$ export CREDENTIALS_DIR=/location/credentials
$ export TOKEN_INFO_URI=tokenInfoUri
$ export FULLSTOP_UNAPPROVED_SERVICES_AND_ROLE_BUCKET_NAME=fullstop-bucket-policy
$ export FULLSTOP_UNAPPROVED_SERVICES_AND_ROLE_PREFIX=folder_containing_templates_files

Disable CloudTrail Processing

Set the parameter fullstop.container.autoStart=false either as program argument, or as system property to start Fullstop without CloudTrail processing.

Scopes

In order to create violations and save them to the database, your application which is responsible for that, needs this oAuth2 scope for the POST method on "/api/violations" endpoint

fullstop.violation.write

Database setup

Fullstop will store the violations in a RDBMS. Once you start Fullstop, it will create the necessary schema and tables for you. The database itself, however, has to be created by you. Your database password is encrypted with AWS KMS. We are using Taupage to decrypt the password on the fly. To use Amazons KMS for de/encryption, you need to to provide a region and the key id for your key. In Fullstop, both will be provided via environment variables.

The password should be already encrypted, when you store it in the DATABASE_PASSWORD environment variable. An encrypted password always starts with aws:kms:. You can use our CLI tool for encryption or you use Amazons AWS CLI.

Propose API changes

Important all changes should be swagger 2.0 spec compliant.

How to build

Needs Java 1.8. Newer jdks are not supported yet.

$ ./mvnw clean install

Run entire test suite (requires a local docker environment)

$ ./mvnw clean verify -Pintegration-test

How to run

You need a locally running PostgreSQL 9.4 server (database "fullstop", host "localhost", user "postgres", password "postgres").

$ # set env variables first
$ cd fullstop
$ mvn spring-boot:run -Dfullstop.container.autoStart=false

How to build a docker image

Build fullstop:

$ mvn clean package -U

Build scm-source.json:

$ ./scm-source.sh

Build docker image:

$ docker build -t registry/fullstop:0.1 fullstop

Show images:

$ docker images

Run with docker:

$ docker run -it registry/fullstop:0.1

Push docker image:

$ docker push registry/fullstop:0.1

License

Copyright © 2015 Zalando SE

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

org.zalando.stups

STUPS by Zalando

THE PROJECTS IN THIS ORG ARE NO LONGER ACTIVELY MAINTAINED

Versions

Version
1.1.0
1.0.1
1.0.0.M1
0.9.0