Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readme #408

Merged
merged 3 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ var keylessSignature =
##### KeylessSignature from bundle
```java
var bundleFile = // java.nio.path to some bundle file
var keylessSignature = BundleFactory.readBundle(Files.newReader(bundleFile, StandardCharsets.UTF_8));
var keylessSignature = BundleFactory.readBundle(Files.newBufferedReader(bundleFile, StandardCharsets.UTF_8));
```

##### Configure verification options
```java
var verificationOptionsBuilder =
var verificationOptions =
VerificationOptions.builder()
// verify online? (connect to rekor for inclusion proof)
.isOnline(true)
Expand All @@ -72,7 +72,7 @@ var verificationOptionsBuilder =
CertificateIdentity.builder()
.issuer("https://accounts.example.com"))
.subjectAlternativeName("test@example.com")
.build());
.build())
.build();
```

Expand Down
18 changes: 15 additions & 3 deletions sigstore-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Signature format uses [Sigstore bundle](https://github.com/sigstore/cosign/pull/

## Requirements

Java 11 (https://github.com/sigstore/sigstore-java requires Java 11)
Gradle 7.5 (Gradle 6 could be supported once https://github.com/jsonschema2dataclass/js2d-gradle/issues/401 is released)
Gradle configuration cache is supported.
* Java 11 (https://github.com/sigstore/sigstore-java requires Java 11)
* Gradle 7.5 (Gradle 6 could be supported once https://github.com/jsonschema2dataclass/js2d-gradle/issues/401 is released)
* Gradle configuration cache is supported.

## Minimal usage

Expand All @@ -25,6 +25,18 @@ plugins {
// and it would resort to Web Browser OIDC otherwise.
```

### GitHub Actions OIDC support

In order for the required environment variables to be available, the workflow requires the following permissions:

```yaml
permissions:
id-token: write
contents: read
```

See [GitHub documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers#adding-permissions-settings) for details.

## Full configuration

```kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private String extractSan(X509Certificate cert) throws FulcioVerificationExcepti
}
if (sans.size() > 1) {
throw new FulcioVerificationException(
"Fulcio ceritifcate must only have 1 SAN, but found " + sans.size());
"Fulcio certificate must only have 1 SAN, but found " + sans.size());
}
var san = sans.stream().findFirst().get();
var type = (Integer) san.get(0);
Expand Down