{"id":14384289,"url":"https://github.com/softwarefactory-project/keycloak-github-ssh-key-attribute-mapper","last_synced_at":"2026-06-01T12:31:32.125Z","repository":{"id":41317048,"uuid":"208840341","full_name":"softwarefactory-project/keycloak-github-ssh-key-attribute-mapper","owner":"softwarefactory-project","description":"A custom Keycloak attribute mapper that fetches a user's SSH keys from the github REST API.","archived":false,"fork":false,"pushed_at":"2024-02-12T11:46:17.000Z","size":94,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T19:45:46.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softwarefactory-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-16T15:57:03.000Z","updated_at":"2025-02-01T18:56:27.000Z","dependencies_parsed_at":"2024-01-14T20:15:40.174Z","dependency_job_id":"742dcd48-cc85-4a97-91dd-1c318b24eaaf","html_url":"https://github.com/softwarefactory-project/keycloak-github-ssh-key-attribute-mapper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/softwarefactory-project/keycloak-github-ssh-key-attribute-mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softwarefactory-project","download_url":"https://codeload.github.com/softwarefactory-project/keycloak-github-ssh-key-attribute-mapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33775857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-28T18:01:16.989Z","updated_at":"2026-06-01T12:31:32.096Z","avatar_url":"https://github.com/softwarefactory-project.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# keycloak-github-ssh-key-attribute-mapper\n\nThis custom attribute mapper can be used to fetch a user's public SSH key whenever they log in with Github, and store it into a custom attribute.\n\n# Build\n\n```\nmvn clean install\n```\n\nTo build the SPI for use with a version of Keycloak prior to 22.X, you need to use openjdk 11 and patch pom.xml to target java 11:\n\n```\n\u003csource\u003e11\u003c/source\u003e\n\u003ctarget\u003e11\u003c/target\u003e\n```\n\n# Prerequisites\n\nA SQL database backend is required. The user attributes table must be manually modified to allow larger attributes like public keys.\n\nExample for mariadb/mysql:\n\n`alter table USER_ATTRIBUTE drop index IDX_USER_ATTRIBUTE_NAME; alter table USER_ATTRIBUTE modify VALUE TEXT(100000) CHARACTER SET utf8 COLLATE utf8_general_ci; alter table USER_ATTRIBUTE ADD KEY IDX_USER_ATTRIBUTE_NAME (NAME, VALUE(400));`\n\n# Deploy (Wildfly)\n\nCopy the built jar into {KEYCLOAK_HOME}/standalone/deployments\n\n# Deploy (Quarkus)\n\nCopy the built jar into /opt/keycloak/providers\n\n# Testing it out\n\nThe `testing` directory contains a Dockerfile that can be used to generate an optimized keycloak image with the mapper preinstalled.\n\nThere is also a compose spinning up keycloak, the mapper, and a mariadb instance - but the database needs to be modified manually (a Github oauth provider as well).\n\nThe `demo.sh` script automates everything, but requires the following preparation:\n\n* Create a Github OAuth app for your test deployment, the callback URL will be http://localhost:8082/realms/test/broker/github/endpoint\n* Set the environment variables GH_CLIENT_ID and GH_CLIENT_PASSWORD to the generated client ID and password, respectively\n* run `demo.sh`\n* Log in with Github when prompted and press any key to display the user's attributes, your SSH key should appear in \"pubKey\".","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwarefactory-project%2Fkeycloak-github-ssh-key-attribute-mapper/lists"}