• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wooga / atlas-build-unity / 2 / 5
25%
master: 78%

Build:
Build:
LAST BUILD BRANCH: PR-154
DEFAULT BRANCH: master
Ran 27 Sep 2021 12:16PM UTC
Files 59
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jul 2020 09:24AM UTC coverage: 21.982% (-60.4%) from 82.365%
2.5

push

jenkins

Add secret handling base types (#59)

Description
===========

This patch brings in base type for future secret handling. These types
are planned as a base API for further detailed implementation in future
patches / plugin extensions.

We have three basic sets of types

* _secrets_ - a wrapper type that holds a secret value
* _resolver_ - a basic object that can resolve a secret
* _secrets_ a map like structure to hold secrets in memory

Secrets
-------

The exposed type is an interface with a pretty simple API

```groovy
interface Secret<T> {
    T getSecretValue()
}
```

There is one base implementation available (`DefaultSecret`) and two concrete
implementations for secret file (`byte[]`) and secret text (`String`).
The concrete classes are only added for completion and are used in some
unit tests.

A second extended form of secret is the `EncryptedSecret`.

```groovy
interface EncryptedSecret<T> extends Secret<T> {
    T decryptedSecretValue(SecretKeySpec key)
    Secret<T> decryptSecret(SecretKeySpec key)
}
```

Objects of type `EncryptedSecret` should encrypt the secret value on
creation. The type contains a two API's to either convert this type back
to an unencrypted secret or to return the enclosed secret value
directly. To make implementation easier, this patch also adds an
`abstract` base class for `EncryptedSecret` objects calles
`AbstractEncryptedSecret`.
This class contains helper methods to encode and decode the secret value
with a passed `AES` key. The implementor needs to provide two
implementations:

```groovy
abstract T decryptedSecretValue(SecretKeySpec key)
abstract protected T encryptSecretValue(T secret, SecretKeySpec key)
```

Two concrete types are also provided for the `EncryptedSecret` called
`EncryptedSecretFile` and `EncryptedSecretText`.

Resolver
--------

The `SecretResolver` interface contains only one small API

```groovy
interface SecretResolver<T> {
    S... (continued)

417 of 1897 relevant lines covered (21.98%)

0.22 hits per line

Source Files on job 2.5
  • Tree
  • List 0
  • Changed 58
  • Source Changed 58
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2
  • 2f954b4f on github
  • Prev Job for on release/1.x (#1.1)
  • Next Job for on release/1.x (#3.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc