org.zalando.stups:issue_13

OAuth2-Tokens Library - Build-Parent

License

License

GroupId

GroupId

org.zalando.stups
ArtifactId

ArtifactId

issue_13
Last Version

Last Version

0.11.0-beta-7
Release Date

Release Date

Type

Type

jar
Description

Description

OAuth2-Tokens Library - Build-Parent
Project Organization

Project Organization

Zalando SE

Download issue_13

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.zalando.stups : tokens-spring-boot-starter jar 0.11.0-beta-7
org.springframework.boot : spring-boot-starter-web jar

test (7)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar
org.springframework.boot : spring-boot-starter-logging jar
org.assertj : assertj-core jar
com.google.guava : guava jar 19.0
org.powermock : powermock-api-mockito jar 1.6.4
org.apache.httpcomponents : httpclient jar
org.springframework.boot : spring-boot-actuator jar

Project Modules

There are no modules declared in this project.

Build Status Maven Central codecov.io

Tokens Support for Spring-Boot apps

Is a small wrapper around Tokens with lifecycle-management and autoconfiguration-support in Spring-Boot applications.

With this in place you can use the 'AccessTokens' anywhere in your application (@Autowire directly or in a configuration class), use it directly or inject it into some 'TokenProvider'-implementations that delegate somehow.

Install

Maven

Add the following to your pom.xml:

    <dependency>
        <groupId>org.zalando.stups</groupId>
        <artifactId>tokens-spring-boot-starter</artifactId>
        <version>${version}</version>
    </dependency>

Gradle

Add the following to your build.gradle:

compile('org.zalando.stups:tokens-spring-boot-starter:${version}')

Usage in Zalandos K8s environment (with PlatformCredentialsSet)

Only put the dependency into your pom.xml. It uses /meta/credentials as a default folder to look for provided tokens by PlatformCredentialsSet.

Want to migrate from STUPS to K8s? See the hints.

Usage in Zalandos STUPS environment

    tokens:
        accessTokenUri: http://localhost:9191/access_token?realm=whatever
    
        token-configuration-list:
            - tokenId: firstService
              scopes:
                  - read
                  - write
                  - all
            - tokenId: secondService
              scopes: all

Migration from Zalandos STUPS env to Zalandos K8s env

Please make sure the credentials are mounted as shown in the example below.

...
          volumeMounts:
          - name: "{{ APPLICATION }}-credentials"
            mountPath: /meta/credentials
            readOnly: true
      volumes:
        - name: "{{ APPLICATION }}-credentials"
          secret:
            secretName: "{{ APPLICATION }}-credentials"

Please also make sure that token identifiers/names must equal the respective items in credentials.yaml:

apiVersion: "zalando.org/v1"
kind: PlatformCredentialsSet
metadata:
   name: "{{ APPLICATION }}-credentials"
spec:
   application: "{{ APPLICATION }}"
   tokens:
     firstService:
       privileges:
         - com.zalando::read
         - com.zalando::write
         - com.zalando::all
     secondService:
       privileges:
         - com.zalando::all

Build

./mvnw install

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
0.11.0-beta-7
0.11.0-beta-6
0.11.0-beta-5
0.11.0-beta-4
0.11.0-beta-3
0.11.0-beta-2
0.11.0-beta-1
0.10.1-GH-13