Sha256: 10798531b8a6c9ccb3840f524ab7502ca3100089ff5a41b461c513c395439e61
Contents?: true
Size: 642 Bytes
Versions: 13
Compression:
Stored size: 642 Bytes
Contents
module Conjur module WebServer # Middleware that adds some conjur info to the rack environment class ConjurInfo def initialize app @app = app end def call env update_env env @app.call env end def update_env env PROPERTIES.each{|name| env["conjur.#{name}"] = send(name)} end PROPERTIES = %w(roleid account stack) def roleid "#{account}:user:#{Conjur::Authn.get_credentials[0]}" end def account Conjur.account end def stack Conjur.stack end end end end
Version data entries
13 entries across 13 versions & 3 rubygems