- 为什么应聘我们公司?
- bugfix of your own code
- add feature of your own code
#!/bin/bash | |
set -x | |
set -e | |
if [[ -z $1 ]]; then | |
echo "Specify location of Graal VM as first argument" | |
exit 1 | |
fi | |
$1/bin/gu install native-image | |
rm -rf META-INF sample sample.build_artifacts.txt Sample.* *.jar | |
echo "public class Sample { |
FROM quay.io/keycloak/keycloak:17.0.1 as builder | |
ENV KC_METRICS_ENABLED=true | |
ENV KC_FEATURES=preview | |
ENV KC_DB=postgres | |
ENV KC_HTTP_RELATIVE_PATH=/auth | |
# specify the custom cache config file here | |
ENV KC_CACHE_CONFIG_FILE=cache-ispn-jdbc-ping.xml | |
# copy the custom cache config file into the keycloak conf dir |
FROM quay.io/keycloak/keycloak:17.0.0 as builder | |
ENV KC_METRICS_ENABLED=true | |
ENV KC_FEATURES=preview | |
ENV KC_DB=postgres | |
ENV KC_HTTP_RELATIVE_PATH=/auth | |
# specify the custom cache config file here | |
ENV KC_CACHE_CONFIG_FILE=cache-ispn-jdbc-ping.xml | |
# copy the custom cache config file into the keycloak conf dir |
This is a short and simple example on how to build a proper Keycloak cluster, using JDBC_PING
as discovery protocol and an NGINX server as reverse proxy.
As this is for legacy Keycloak version (Wildfly based, up until version 17), you can find an example for more current and uptodate versions at this gist here: https://gist.github.com/dasniko/3a57913047af3ca1b6b0a83b294dc1a1
Please see also my video about Keycloak Clustering: http://www.youtube.com/watch?v=P96VQkBBNxU
This gist describes the configuration required for Spring reactive WebClient to make a call to an OAuth2 protected resource through OAuth2.0 Client Credentials Grant Type Flow.
Assumption is that the Authorization Server supports OpenId Connect 1.0 specifications.
package com.cem.oauth2.configuration.feign; | |
import com.cem.oauth2.configuration.AuthProperties; | |
import feign.RequestInterceptor; | |
import org.keycloak.OAuth2Constants; | |
import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext; | |
import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails; |
#!/bin/bash | |
set -e -u -o pipefail | |
commits="1e13e22c 0.20200420 avoid-get_keys" | |
modes="parallel serial none" | |
output=results.csv | |
echo -n 'num_metrics' > $output | |
for mode in $modes; do | |
for commit in $commits; do |
$ curl -L "https://gist.githubusercontent.com/chrisdarroch/7018927/raw/9a6d663fd7a52aa76a943fe8a9bc6091ad06b18d/idea" -o /usr/local/bin/idea
$ chmod +x /usr/local/bin/idea
$ curl -L "https://gist.githubusercontent.com/sgyyz/adfa4f05af3d81cf0e17e19cf7044c85/raw/b6b9e871d5a4f5435a09d00b0a52e3db0b90699a/uao.sh" -o /usr/local/bin/uao.sh
$ chmod +x /usr/local/bin/uao.sh
$ ln -sf /usr/local/bin/uao.sh /usr/local/bin/uao
The view ClusterRole doesn’t actually have permissions for the Cluster level objects like Nodes and Persistent Volume Claims. So we’ll have to create a new RBAC config.
First, we’ll create a new dashboard-viewonly ClusterRole:
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dashboard-viewonly