Skip to content

Instantly share code, notes, and snippets.

@mkanoor
mkanoor / kafka_ssl_inputs.yml
Last active March 6, 2026 22:33
Kafka Server Side TLS
fields:
- id: host
type: string
label: Host
default: localhost
- id: port
type: string
label: Port
default: '9092'
help_text: The Kafka Port Number
@mkanoor
mkanoor / kafka_ssl_injectors.yml
Created March 10, 2025 18:47
Kafa Server Side SSL Injectors
file:
template.cafile: '{{cafile}}'
extra_vars:
host: '{{host}}'
port: '{{port}}'
topic: '{{topic}}'
offset: '{{offset}}'
group_id: '{{group_id}}'
verify_mode: '{{verify_mode}}'
check_hostname: '{{check_hostname}}'
@mkanoor
mkanoor / kafka_mtls_inputs.yml
Last active April 9, 2025 19:35
Kafka Server mTLS inputs
fields:
- id: host
type: string
label: Host
default: localhost
- id: port
type: string
label: Port
help_text: The Kafka Port Number
default: '9093'
@mkanoor
mkanoor / kafka_mtls_injectors.yml
Last active April 8, 2025 14:01
Kafka mTLS injectors
file:
template.cafile: '{{cafile}}'
template.keyfile: '{{keyfile}}'
template.certfile: '{{certfile}}'
extra_vars:
host: '{{host}}'
port: '{{port}}'
topic: '{{topic}}'
offset: '{{offset}}'
group_id: '{{group_id}}'
@mkanoor
mkanoor / kafka_docker_compose_mtls.yml
Last active March 11, 2025 15:02
Kafka docker compose with Mutual TLS
---
version: '2'
services:
broker:
image: apache/kafka:latest
hostname: broker
container_name: broker
ports:
- '9093:9093'
- '49093:49093'
fields:
- id: host
type: string
label: Host
default: localhost
help_text: The Kafka Server
- id: port
type: string
label: Port
default: '9093'
@mkanoor
mkanoor / kafka_tls_injectors.yml
Last active April 7, 2025 20:58
Kafka TLS Injectors
file:
template.cafile: '{{cafile}}'
extra_vars:
host: '{{host}}'
port: '{{port}}'
topic: '{{topic}}'
offset: '{{offset}}'
group_id: '{{group_id}}'
verify_mode: '{{verify_mode}}'
check_hostname: '{{check_hostname}}'
"""
SAML authenticator migrator.
This module handles the migration of SAML authenticators from AWX to Gateway.
"""
from django.conf import settings
from gateway_mapping import org_map_to_gateway_format, team_map_to_gateway_format
from base_migrator import BaseAuthenticatorMigrator
"""
Base authenticator migrator class.
This module defines the contract that all specific authenticator migrators must follow.
"""
from urllib.parse import urlparse, parse_qs
from django.conf import settings
from gateway_client import GatewayAPIError
"""
Gateway API client for AAP Gateway interactions.
This module provides a client class to interact with the AAP Gateway REST API,
specifically for creating authenticators and mapping configurations.
"""
import requests
import logging
from typing import Dict, List, Optional, Any