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

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

Build:
Build:
LAST BUILD BRANCH: PR-154
DEFAULT BRANCH: master
Ran 14 Jul 2020 09:24AM UTC
Jobs 7
Files 75
Run time 668220min
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

pending completion
2

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)

962 of 2030 relevant lines covered (47.39%)

1.35 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2.1 14 Jul 2020 09:24AM UTC 0
82.2
2 2.2 14 Jul 2020 09:26AM UTC 0
42.97
3 2.3 14 Jul 2020 09:31AM UTC 0
42.97
4 2.4 27 Sep 2021 12:16PM UTC 0
21.98
5 2.5 27 Sep 2021 12:16PM UTC 0
21.98
6 2.6 27 Sep 2021 12:19PM UTC 0
37.95
7 2.7 21 Oct 2021 10:23AM UTC 0
38.05
Source Files on build 2
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #2
  • 2f954b4f on github
  • Prev Build on release/1.x (#1)
  • Next Build on release/1.x (#3)
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