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

Bump org.bouncycastle:bcprov-jdk18on from 1.77 to 1.78 in /hashing #82

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
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
52 changes: 0 additions & 52 deletions .github/workflows/dynamic-matrix-poc.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/junit-flaky.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Info

env:
DEFAULT_LINUX_RUNNER: 'ubuntu-latest'

on:
workflow_dispatch:

jobs:
cpu:
runs-on: ubuntu-latest
runs-on: ${{ vars.DEFAULT_LINUX_RUNNER || 'ubuntu-latest' }}

steps:
- name: lscpu
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Requires:
markdown-playground
===================
[link1]
[link2][something]

* [GitHub CLI](https://cli.github.com/)

Scripts:

* `kc-workflow-health.sh` - Show % success of workflows (`./kc-workflow-health.sh -d 3` will show % success last 3 days)
* `kc-ci-failures.sh` - Show failures in Keycloak CI workflow (`./kc-ci-failures.sh -d 3 -u` will show unique failures last 3 days)
* `kc-pr-ci-wait-time.sh` - Show waiting time from PR created/updated to CI complets (`./kc-pr-ci-wait-time.sh -d 7` will show wait time for PRs merged last 7 days)
[link1]: http://something "My first link"
[link2]: http://else "My second link"
64 changes: 64 additions & 0 deletions docs/FIPS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Add the following from https://www.bouncycastle.org/download/bouncy-castle-java-fips/#latest to `$KC_HOME/providers/`:
```
bc-fips-2.0.0.jar
bcpkix-fips-2.0.7.jar
bctls-fips-2.0.19.jar
bcutil-fips-2.0.3.jar
```

Download Java from `https://adoptium.net/` and update `conf/security/java.security` file to have the following providers:

```
security.provider.1=org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider
security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider fips:BCFIPS
security.provider.3=sun.security.provider.Sun
```

Note: Without `sun.security.provider.Sun` Keycloak doesn't start

Generate a self-signed certificate for Keycloak:
```
cd $KC_HOME/conf
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/CN=localhost"
```

Start Keycloak with:
```
bin/kc.sh start --features=fips --https-certificate-file=conf/cert.pem --https-certificate-key-file=conf/key.pem --hostname-strict=false
```

### SHA-1 not available

Without `sun.security.provider.Sun ` the following error is thrown on startup:

```
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
Caused by: java.lang.InternalError: internal error: SHA-1 not available.
at java.base/sun.security.provider.SecureRandom.init(SecureRandom.java:116)
at java.base/sun.security.provider.SecureRandom.<init>(SecureRandom.java:87)
at java.base/java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:293)
at java.base/java.security.SecureRandom.<init>(SecureRandom.java:225)
at java.base/java.util.UUID$Holder.<clinit>(UUID.java:104)
at java.base/java.util.UUID.randomUUID(UUID.java:150)
at io.quarkus.runtime.configuration.ConfigUtils.configBuilder(ConfigUtils.java:67)
at io.quarkus.runtime.configuration.QuarkusConfigFactory.getConfigFor(QuarkusConfigFactory.java:27)
at io.smallrye.config.SmallRyeConfigProviderResolver.getConfig(SmallRyeConfigProviderResolver.java:78)
at io.smallrye.config.SmallRyeConfigProviderResolver.getConfig(SmallRyeConfigProviderResolver.java:66)
at org.keycloak.quarkus.runtime.configuration.Configuration.getConfig(Configuration.java:79)
at org.keycloak.quarkus.runtime.configuration.Configuration.getBuildTimeProperty(Configuration.java:101)
at org.keycloak.quarkus.runtime.cli.Picocli.requiresReAugmentation(Picocli.java:250)
at org.keycloak.quarkus.runtime.cli.Picocli.runReAugmentationIfNeeded(Picocli.java:227)
at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:132)
at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:106)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 3 more
Caused by: java.security.NoSuchAlgorithmException: SHA MessageDigest not available
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.base/java.security.MessageDigest.getInstance(MessageDigest.java:185)
at java.base/sun.security.provider.SecureRandom.init(SecureRandom.java:114)
... 19 more
```
2 changes: 1 addition & 1 deletion hashing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.77</version>
<version>1.78</version>
</dependency>
</dependencies>

Expand Down