module Vaml::Github

Public Class Methods

auth(token) click to toggle source
# File lib/vaml/github.rb, line 14
def self.auth(token)
  puts "Authenticating to Github ... "
  Vault.auth.github(token)
end
enable_auth(org = Vaml.configuration.organization) click to toggle source
# File lib/vaml/github.rb, line 3
def self.enable_auth(org = Vaml.configuration.organization)
  puts "Enabling auth for #{org} ... "
  Vault.sys.enable_auth("github", "github") unless Vault.sys.auths[:github]
  Vault.logical.write("auth/github/config", organization: org)
end
grant_policy(team_name, policy_name) click to toggle source
# File lib/vaml/github.rb, line 9
def self.grant_policy(team_name, policy_name)
  puts "Granting policy for #{team_name} ... #{policy_name} "
  Vaml.write_string("auth/github/map/teams/#{team_name}", policy_name)
end