All Projects → Nike-Inc → cerberus-java-client

Nike-Inc / cerberus-java-client

Licence: Apache-2.0 license
Java Client for Cerberus

Programming Languages

java
68154 projects - #9 most used programming language
XSLT
1337 projects

Projects that are alternatives of or similar to cerberus-java-client

cerberus-node-client
Node client for interacting with a Cerberus backend. It can be used in Amazon EC2 instances and Amazon Lambdas.
Stars: ✭ 16 (+14.29%)
Mutual labels:  cerberus, cerberus-client
JRedisGraph
Java API for RedisGraph
Stars: ✭ 56 (+300%)
Mutual labels:  java-client
Cerberus
A few simple, but solid patterns for responsive HTML email templates and newsletters. Even in Outlook and Gmail.
Stars: ✭ 4,356 (+31014.29%)
Mutual labels:  cerberus
nakama-java
Android optimized Java client for Nakama server.
Stars: ✭ 26 (+85.71%)
Mutual labels:  java-client
SketchwareAPI
Sketchware API Multiplatform Library
Stars: ✭ 26 (+85.71%)
Mutual labels:  java-client
onesait-cloud-platform-clientlibraries
Client libraries to interact with Onesait Platform Cloud Side (Digital Broker specially)
Stars: ✭ 15 (+7.14%)
Mutual labels:  java-client
cerberus-serverless-components
A collection of AWS Serverless components for Cerberus
Stars: ✭ 12 (-14.29%)
Mutual labels:  cerberus
JRediSearch
Java Client for RediSearch
Stars: ✭ 133 (+850%)
Mutual labels:  java-client
JRedisTimeSeries
Java Client for RedisTimeSeries
Stars: ✭ 29 (+107.14%)
Mutual labels:  java-client
grafana-api-java-client
A simple java client for interacting with Grafana using a fluent interface.
Stars: ✭ 40 (+185.71%)
Mutual labels:  java-client
redis-modules-java
Java client libraries for redis-modules https://redis.io/modules, based on Redisson. https://github.com/redisson/redisson
Stars: ✭ 57 (+307.14%)
Mutual labels:  java-client
kong-java-client
Java Client for Kong API Gateway configuration
Stars: ✭ 69 (+392.86%)
Mutual labels:  java-client
Mockserver
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and…
Stars: ✭ 3,479 (+24750%)
Mutual labels:  java-client
cassandra-client
Cassandra 3 GUI client
Stars: ✭ 49 (+250%)
Mutual labels:  java-client
jetty-load-generator
jetty-project.github.io/jetty-load-generator/
Stars: ✭ 62 (+342.86%)
Mutual labels:  java-client
cerberus-lifecycle-cli
Command Line Interface for managing a Cerberus environment in AWS
Stars: ✭ 15 (+7.14%)
Mutual labels:  cerberus
wp-api-v2-client-java
WP-API v2 Java Client
Stars: ✭ 72 (+414.29%)
Mutual labels:  java-client
mockserver-node
Node.js module and grunt plugin to start and stop MockServer and MockServer Proxy
Stars: ✭ 34 (+142.86%)
Mutual labels:  java-client
itunes-api
Java client for iTunes APIs
Stars: ✭ 32 (+128.57%)
Mutual labels:  java-client
SparkJobServerClient
Java Client of the Spark Job Server implementing the arranged Rest APIs
Stars: ✭ 50 (+257.14%)
Mutual labels:  java-client

Cerberus Client

codecov

This is a Java based client library for Cerberus that is built on top of Nike's Cerberus client.

This library acts as a wrapper around the Nike developed Cerberus client by configuring the client to be Cerberus compatible.

To learn more about Cerberus, please see the Cerberus website.

Publishing Notice 3/17/2021

As of spring 2021, JFrog has decided to sunset Bintray and JCenter. Due to this decision, we are pausing our open source publishing of the Cerberus Client. However, we will still be updating the source code and making new GitHub releases.

In order to build the jar yourself, run this command:

./gradlew assemble

The jar will be located in ./build/libs/.

For any questions or concerns, create a Github issue here.

Quickstart for Cerberus Java Client

  1. Add the Cerberus client dependency to your build (e.g. Maven, Gradle).
  2. Access secrets from Cerberus using Java.
    String cerberusUrl = "https://cerberus.example.com";
    String region = "us-west-2";
    CerberusClient cerberusClient = DefaultCerberusClientFactory.getClient(cerberusUrl, region);
    Map<String,String> secrets = cerberusClient.read("/app/my-sdb-name").getData();

Check out "Working with AWS Credentials" for more information on how the AWS SDK for Java loads credentials.

Manage Safe Deposit Box

Create Safe Deposit Box

Your IAM role or user needs to be added to any safe deposit box to be authorized to create a safe deposit box.

    String cerberusUrl = "https://cerberus.example.com";
    String region = "us-west-2";
    CerberusClient cerberusClient = DefaultCerberusClientFactory.getClient(cerberusUrl, region);
    String appCategoryId = cerberusClient.getCategoryIdByPath("app");
    Map<CerberusRolePermission, String> rolePermissionMap = cerberusClient.getRolePermissionMap();
    CerberusSafeDepositBoxResponse newSdb = cerberusClient.createSafeDepositBox(CerberusSafeDepositBoxRequest.newBuilder()
                    .withName("cerberus secrets")
                    .withOwner("very important user group")
                    .withCategoryId(appCategoryId)
                    .withRolePermissionMap(rolePermissionMap)
                    .withIamPrincipalPermission("arn:aws:iam::12345:role/ec2-role", OWNER)
                    .withUserGroupPermission("readonly group", READ)
                    .build());

Update Safe Deposit Box

Your IAM role or user needs to be the owner of a safe deposit box to update it.

    String cerberusUrl = "https://cerberus.example.com";
    String region = "us-west-2";
    CerberusClient cerberusClient = DefaultCerberusClientFactory.getClient(cerberusUrl, region);
    Map<CerberusRolePermission, String> rolePermissionMap = cerberusClient.getRolePermissionMap();
    CerberusSafeDepositBoxResponse sdb = cerberusClient.getSafeDepositBoxByName("cerberus secrets");
    cerberusClient.updateSafeDepositBox(CerberusSafeDepositBoxRequest.newBuilder()
                    .withCerberusSafeDepositBoxResponse(sdb)
                    .withRolePermissionMap(rolePermissionMap)
                    .withIamPrincipalPermission("arn:aws:iam::12345:role/lambda-role", READ)
                    .build());

Delete Safe Deposit Box

Your IAM role or user needs to be the owner of a safe deposit box to delete it.

    String cerberusUrl = "https://cerberus.example.com";
    String region = "us-west-2";
    CerberusClient cerberusClient = DefaultCerberusClientFactory.getClient(cerberusUrl, region);
    Map<CerberusRolePermission, String> rolePermissionMap = cerberusClient.getRolePermissionMap();
    CerberusSafeDepositBoxResponse sdb = cerberusClient.getSafeDepositBoxByName("cerberus secrets");
    cerberusClient.deleteSafeDepositBox(sdb.getId());

Development

Run Integration Tests

First, make sure the following environment variables are set before running the Java Client integration tests:

    export CERBERUS_ADDR=https://example.cerberus.com
    export TEST_REGION=us-west-2

Then, make sure AWS credentials have been obtained. One method is by running gimme-aws-creds:

    gimme-aws-creds

Next, in the project directory run:

    ./gradlew integration

License

Cerberus client is released under the Apache License, Version 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].