# README
Vault Plugin Auth OCI
Vault auth plugin for Oracle Cloud Infrastructure.
Acceptance tests
The acceptance tests can only be run from an OCI instance.
If you are running this code on an OCI instance, you can run them directly with make testacc
.
You will need to set the following environtment variables:
HOME_TENANCY_ID
to the tenancy you are running under (or your root tenancy ID)ROLE_OCID_LIST
to a comma-separated list of group OCIDs to at least two groups. At least one should be a dynamic group that contains the instance, and another should be an identity group that contains your user.
For example:
make testacc HOME_TENANCY_ID=ocid1.tenancy.oc1..aaaaaaaasomecharacter ROLE_OCID_LIST=ocid1.group.oc1..aaaaaaaasomecharacters OCI_GO_SDK_DEBUG=info VAULT_LOG_LEVEL=debug
Terraform
You can run the acceptance tests with terraform as well.
You will need an OCI account.
You need to generate and download a private key in your account settings. This should give you a private key file, the fingerprint, your tenancy OCID, and your user OCID.
Using those, you can run the acceptance tests via:
cd tests/terraform
# download your private key to this directory
terraform init
terraform apply \
-var "fingerprint=YOURFINGERPRINT" \
-var "tenancy_ocid=YOUR_TENANCY_OCID" \
-var "user_ocid=YOUR_USER_OCID" \
-var "private_key_path=YOUR_PRIVATE_KEY" \
-var "region=YOUR_REGION"
This downloads the current main
branch from GitHub and runs the tests on an OCI instance.
It takes about 5 minutes.
Don't forget to destroy the resources when you are done:
terraform destroy \
-var "fingerprint=YOURFINGERPRINT" \
-var "tenancy_ocid=YOUR_TENANCY_OCID" \
-var "user_ocid=YOUR_USER_OCID" \
-var "private_key_path=YOUR_PRIVATE_KEY" \
-var "region=YOUR_REGION"
# Packages
No description provided by the author
# Functions
No description provided by the author
CreateLoginData creates the interface required for a login request, signed using the corresponding OCI Identity Principal.
No description provided by the author
FromClaims takes in a claim and coverts it to an InternalClaim.
FromClaims takes in a list of claims and coverts it to InternalClaims.
No description provided by the author
No description provided by the author
NewAuthenticationClientWithConfigurationProvider Creates a new default Authentication client with the given configuration provider.
NewIdentityClientWithConfigurationProvider Creates a new default Identity client with the given configuration provider.
# Constants
HdrRequestTarget represents the special header name used to refer to the HTTP verb and URI in the signature.
These constants store the configuration keys.
Increasing this above this limit might require implementing client-side paging in the filterGroupMembership API.
These constants store the required http path & method information for validating the signed request.
These constants store the required http path & method information for validating the signed request.
These constants store the required http path & method information for validating the signed request.
These constants store the required http path & method information for validating the signed request.
These constants store the required http path & method information for validating the signed request.
These constants store the required http path & method information for validating the signed request.
These constants define types of principal.
These constants define types of principal.
# Variables
This constant defines the Principal type key.
# Structs
Stores the request headers required for authenticating the client.
Stores the request body and meta-data required for authenticating the client.
Stores the response of the AuthenticateClient request, including meta-data.
Contains the result of the Authenticate Client request.
AuthenticationClient stores the client and configuration details for authenticating.
Stores a list of claims of a Principal.
No description provided by the author
Stores the Principal and list of Group or Dynamic Group Ids required for the filtering request.
Stores the request body and meta-data required for filtering the group membership.
Stores the response of the FilterGroupMembership request, including meta-data.
Contains the result of the FilterGroupMembership request.
Claim is a representation of a JWT claim.
OciClient stores the client and configuration details for making API requests to OCI Identity Service.
Struct to hold the information associated with an OCI config.
Struct to hold the information associated with an OCI role.
Stores the details about a Principal.
# Type aliases
Claims represents a collection of JWT claims.