-
Display role bindings for conjur-cluster service account token
oc get clusterrolebindings -o json \ | jq '.items | map(select(any(.subjects[]; .name | contains("conjur-cluster"))))'
-
Display conjur-authenticator role information
oc describe clusterrole conjur-authenticator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: db-credentials | |
namespace: k8s-secrets-app | |
type: Opaque | |
stringData: | |
conjur-map: |- | |
address: cd/kubernetes/db/host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
APIURL="https://cluster.com" | |
PORT="6443" | |
SERVERNAME="cluster.com" | |
output_prefix="final-" | |
extension="temp" | |
dlfilename="retrieved.pem" | |
pullcerticate_test() { | |
local tofile="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
sudo dnf -y upgrade | |
sudo yum install -y snapd | |
sudo systemctl enable --now snapd.socket | |
sudo ln -s /var/lib/snapd/snap /snap | |
sudo reboot now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace ValidateJWTConsoleApp | |
{ | |
class Helper | |
{ | |
internal static class AsyncHelper | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conjur policy for authn-jwt using above JWT: | |
--- | |
# authn-jwt endpoint | |
- !policy | |
id: conjur/authn-jwt/c73bf3ef-87e9-48e0-ac85-9c723e6cca39 # <-- Authn ID set to tenant ID | |
body: | |
- !variable jwks-uri # <-- https://login.microsoftonline.com/common/discovery/keys | |
- !variable token-app-property # <-- set to "appid" (actual name of claim) | |
# - !variable identity-path # <-- not needed for id below (policy is applied at root) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is “first-party” way to do it, using only plain Java libraries. | |
// Starting from the top, one needs to configure an HTTP client. The only requirement here is that we need something that can accept an instance of `javax.net.SSLContext`, which it can use to create connections. | |
// This `SSLContext` is the class that can be configured to facilitate the authentication, but it must be done with the `javax.net.ssl.KeyManager` class. | |
// To create the `KeyManagers`, one can use `KeyManagerFactory` as follows: | |
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); | |
KeyStore clientCertKeyStore = getKeyStoreWithKey(cyberArkCCP.getKey(), cyberArkCCP.getKeyPassword()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "CentralCredentialObject.h" | |
#include <iostream> | |
size_t CentralCredentialObject::WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) | |
{ | |
((std::string*)userp)->append((char*)contents, size * nmemb); | |
return size * nmemb; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org | |
import java.io.FileInputStream | |
import java.io.InputStream | |
import java.net.URL | |
import java.net.http.HttpClient | |
import java.net.http.HttpRequest | |
import java.net.http.HttpResponse.BodyHandlers | |
import java.security.KeyStore | |
import java.security.KeyStoreException |