Skip to content

Instantly share code, notes, and snippets.

@dolph
dolph / events.md
Last active March 10, 2016 07:47
OpenStack Bug Smash
@dolph
dolph / cache_demo.py
Last active January 22, 2016 15:49
Show that cache invalidation occurs per dogpile.cache region
"""Illustrate dogpile.cache invalidation behavior.
dogpile.cache's invalidation behavior is surprising because dogpile does not
write to memcached when you tell it to invalidate an entry.
Invalidation works by setting a current timestamp (using time.time())
representing the "minimum creation time" for a value. Any retrieved value
whose creation time is prior to this timestamp is considered to be stale.
It does not affect the data in the cache in any way, and is also local to
this instance of CacheRegion.
@dolph
dolph / _summary.md
Last active October 8, 2015 21:03
Keystone Fernet token creation & validation benchmarking on stable/liberty w/ and w/o catalog caching

Fernet token creation

Time per request: 16.7% faster w/ catalog caching patch

Fernet token validation

Time per request: 7.5% faster w/ catalog caching patch

# -*- coding: utf-8 -*-
"""Demonstrate high quality docstrings.
Module-level docstrings appear as the first "statement" in a module. Remember,
that while strings are regular Python statements, comments are not, so an
inline comment may precede the module-level docstring.
After importing a module, you can access this special string object through the
``__doc__`` attribute; yes, it's actually available as a runtime attribute,
despite not being given an explicit name! The ``__doc__`` attribute is also
@dolph
dolph / local.conf
Last active June 29, 2016 00:19
Minimal devstack install: tempest + keystone w/ fernet
[[local|localrc]]
# Abide by tradition.
SERVICE_TOKEN=ADMIN
ADMIN_PASSWORD=secrete
MYSQL_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
@dolph
dolph / keystone_apache.conf
Last active November 29, 2022 08:18
Keystone OpenID Connect + Authorization Code Flow
<VirtualHost *:5000>
...
OIDCClaimPrefix "OIDC-"
OIDCResponseType "code"
OIDCScope "openid email profile"
OIDCProviderMetadataURL http://<keycloak_host>:8080/auth/realms/master/.well-known/openid-configuration
OIDCClientID <client_id>
OIDCClientSecret <client_secret>
@dolph
dolph / curl.sh
Last active September 21, 2018 03:33
Peeking inside OpenStack keystone Fernet token payloads: http://dolphm.com/inside-openstack-keystone-fernet-token-payloads
curl localhost:35357/v3/auth/tokens \
-H "X-Subject-Token: {{ fernet_token }}" \
-H "X-Auth-Token: {{ keystone.conf [default] admin_token }}" \
| python -m json.tool
@dolph
dolph / user_idp.yml
Last active September 16, 2015 21:56
Keystone2Keystone federation configuration for https://github.com/openstack/openstack-ansible
keystone_idp_id: my_idp
keystone_sp_id: my_sp
keystone_sp_host: 104.239.231.30
keystone_idp:
service_providers:
- id: "{{ keystone_sp_id }}"
auth_url: http://{{ keystone_sp_host }}:5000/v3/OS-FEDERATION/identity_providers/{{ keystone_idp_id }}/protocols/saml2/auth
sp_url: http://{{ keystone_sp_host }}:5000/Shibboleth.sso/SAML2/ECP
idp_entity_id: "{{ keystone_service_publicurl_v3 }}/OS-FEDERATION/saml2/idp"
[dashboard]
title = Review inbox
description = Watched & starred reviews
foreach =
[section "New"]
query = is:open (is:watched OR is:starred) -owner:self -label:Code-Review<=2 label:Verified+1,jenkins label:Workflow+0
[section "+1"]
query = is:open (is:watched OR is:starred) -owner:self -label:Code-Review<=+2,self -label:Code-Review<=-1 label:Code-Review+1 -label:Code-Review+2 label:Verified+1,jenkins label:Workflow+0
[dashboard]
title = My Reviews
description =
foreach =
[section "In progress"]
query = is:open owner:self -Workflow-1 -label:Verified<=-1 -label:Code-Review-1
[section "Needs attention"]
query = is:open owner:self (Workflow-1 OR label:Verified<=-1 OR label:Code-Review<=-1)