Skip to content

Instantly share code, notes, and snippets.

@kgilpin
kgilpin / Rails Sample App 6th Ed - Microposts interface test URL
Last active October 15, 2020 18:10
Rails Sample App 6th Ed - Microposts interface test
https://app.land/applications/219?mapset=1970
@kgilpin
kgilpin / test.md
Created June 4, 2018 18:07
Test JS

hi

<script> alert('hi') </script>
@kgilpin
kgilpin / policy-2.yml
Created February 2, 2018 16:15
User management bug
root@3935c7d86a07:/# cat policy-2.yml
- !user alice
- !group developers
- !grant
role: !group developers
member: !user alice
@kgilpin
kgilpin / authn_k8s.yml
Last active December 5, 2017 14:18
authn-k8s
- !policy
id: conjur/authn-k8s/minikube/default
owner: !group /k8s_admin
body:
- !webservice
annotations:
kubernetes/namespace: default
- !host client
@kgilpin
kgilpin / myapp.yml
Created September 1, 2017 13:53
AnsibleFest Policy Refactor
- !policy
id: myapp
body:
- &variables
- !variable
id: database/username
annotations:
description: Application database username
- !variable
id: database/password
@kgilpin
kgilpin / README.md
Last active February 11, 2016 22:23
Conjur Traffic Auth for the Truly Paranoid

Approach

Create distinct roles with specific permissions to call untrusted web services.

Client services authenticate as one of these roles when calling an untrusted web service.

Discussion

When using an externalized (Nginx) forwarder and gatekeeper, a webservice client can send a Conjur access token for its own identity. The client doesn't have to worry about the gatekeeper misusing the access token,

@kgilpin
kgilpin / bastion-policy.rb
Last active October 28, 2015 14:45
DSL Tutorial
# Defines a Bastion server layer.
#
# Usage:
# conjur policy load --as-group ops bastion-policy.rb
policy "bastion" do
# Members of this group will be able to adminsiter the bastion.
admins = group "admins"
# Members of this group will be able to login to the bastion
# with a regular, non-privileged account.
users = group "users"
@kgilpin
kgilpin / blue-green.rb
Created June 13, 2015 20:14
Simple blue/green model
# Simple script which creates two groups, blue and green. Each
# group contains a couple of users. The groups have different permissions
# on 'webservice' resources. In an SDF gatekeeper scenario, the 'blue'
# team will be able to 'read' service a, and the 'green' team will be
# able to 'read' service b. Neither team can perform any action besides 'read'.
# The owner of the 'webservice' resources (which is the user that runs this script)
# has all permissions on all records, via Conjur ownership.
# Create the blue team
blue = group "blue" do