From ebe1f3b707ca62292901548116f2d2b2140b7c48 Mon Sep 17 00:00:00 2001 From: Chris Arcand Date: Tue, 3 Feb 2026 20:51:12 -0600 Subject: [PATCH] Add authentication examples to README Added a brief Authentication section showing common auth methods: - LDAP - Username/Password - AppRole - GitHub - AWS IAM Fixes #213 --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 63bf998..00020cf 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,27 @@ client_1 = Vault::Client.new(address: "https://vault.mycompany.com") client_2 = Vault::Client.new(address: "https://other-vault.mycompany.com") ``` +### Authentication + +Authenticate using various methods: + +```ruby +# LDAP +Vault.auth.ldap("username", "password") + +# Username/Password +Vault.auth.userpass("username", "password") + +# AppRole +Vault.auth.approle("role_id", "secret_id") + +# GitHub token +Vault.auth.github("github_token") + +# AWS IAM +Vault.auth.aws_iam("role_name", credentials_provider, "header_value") +``` + And if you want to authenticate with a `AWS EC2` : ```ruby