Skip to content

Instantly share code, notes, and snippets.

@benissimo
benissimo / wif-poc-redacted.yml
Created May 26, 2026 13:16
Anthropic API authentication via GitHub Actions Workload Identity Federation (WIF) — minimal proof-of-concept. Used as evidence in a gh-aw-firewall feature request.
# Proof-of-concept: authenticate to the Anthropic API from GitHub Actions
# via Workload Identity Federation (WIF) — no long-lived ANTHROPIC_API_KEY.
#
# Verified working end-to-end against the existing Anthropic API tier
# (no Enterprise contract required). Full exchange in ~3 seconds.
#
# Audit event from a successful run shows outcome: success, with
# user_agent: anthropic-python/0.104.1, subject: repo:OWNER/REPO:
# ref:refs/heads/main, requested_service_account_id matching the
# configured service account.
@benissimo
benissimo / submit_protobuf_schema_to_confluent_registry_via_rest_interface.sh
Last active October 24, 2024 13:34
Manually tested with Confluent Platform 6.2.0
#!/bin/bash
# set -x
function schemaPost {
# Use heredoc to strip out newlines, needed so that post is pure JSON
cat <<EOF
{
"schemaType": "PROTOBUF",
"schema": "${escapedSchema}"
}
@benissimo
benissimo / jdbc_db2_spec.rb
Last active August 29, 2015 14:11
test case for issue 606 of activerecord-jdbc-adapter
require 'spec_helper'
# tested using jruby 1.7.6, activerecord 3.2.21, db2 10.5, and activerecord-jdbc-adapter (1.2.9 vs 1.3.13)
# and rspec 2.13.0
describe "add_limit_offset!" do
before do
CreateTablesForAddLimitOffsetTestMigration.migrate :up
end
after do