https://github.com/theapsgroup/steampipe-plugin-keycloak
Use SQL to instantly query Keycloak clients, users and more. Open source CLI. No DB required.
https://github.com/theapsgroup/steampipe-plugin-keycloak
golang keycloak postgres postgresql postgresql-fdw sql steampipe steampipe-plugin
Last synced: about 2 months ago
JSON representation
Use SQL to instantly query Keycloak clients, users and more. Open source CLI. No DB required.
- Host: GitHub
- URL: https://github.com/theapsgroup/steampipe-plugin-keycloak
- Owner: theapsgroup
- License: apache-2.0
- Created: 2021-10-27T10:36:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T08:25:42.000Z (over 2 years ago)
- Last Synced: 2024-06-19T19:42:40.502Z (almost 2 years ago)
- Topics: golang, keycloak, postgres, postgresql, postgresql-fdw, sql, steampipe, steampipe-plugin
- Language: Go
- Homepage: https://hub.steampipe.io/plugins/theapsgroup/keycloak
- Size: 252 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# Keycloak Plugin for Steampipe
Use SQL to query information including Users, Groups, Clients, Roles and more from Keycloak.
- **[Get started →](https://hub.steampipe.io/plugins/theapsgroup/keycloak)**
- Documentation: [Table definitions & examples](https://hub.steampipe.io/plugins/theapsgroup/keycloak/tables)
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
- Get involved: [Issues](https://github.com/theapsgroup/steampipe-plugin-keycloak/issues)
## Quick start
Install the plugin with [Steampipe](https://steampipe.io):
```shell
steampipe plugin install theapsgroup/keycloak
```
Set up the configuration:
```shell
vi ~/.steampipe/config/keycloak.spc
```
or set the following Environment Variables
- `KEYCLOAK_ADDR` : The Endpoint at which to contact your Keycloak instance (example: https://auth.example.com/ )
- `KEYCLOAK_USER` : The Username for a user with Admin privileges
- `KEYCLOAK_PASSWORD` : The password for a user with Admin privileges
- `KEYCLOAK_REALM` : The realm in the Keycloak instance you wish to query.
Run a query:
```sql
select * from keycloak_user;
```
## Developing
Prerequisites:
- [Steampipe](https://steampipe.io/downloads)
- [Golang](https://golang.org/doc/install)
- [Keycloak](https://www.keycloak.org/) - with Admin credentials.
Clone:
```sh
git clone https://github.com/theapsgroup/steampipe-plugin-keycloak.git
cd steampipe-plugin-keycloak
```
Build, which automatically installs the new version to your `~/.steampipe/plugins` directory:
```
make install
```
Configure the plugin:
```
cp config/* ~/.steampipe/config
vi ~/.steampipe/config/keycloak.spc
```
Try it!
```
steampipe query
> .inspect keycloak
```
Further reading:
- [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
- [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)
## Credits
Keycloak API Wrapper [Nerzal/gocloak](https://github.com/Nerzal/gocloak) licensed separately using this [Apache License](https://github.com/Nerzal/gocloak/blob/main/LICENSE).