Skip to content

Commit

Permalink
WIP: Support for Keycloak 17+ / Version 19 as target (#361)
Browse files Browse the repository at this point in the history
* accept interfaces, return structs

* update dependencies

* update go version in CI

* Fix linter errors

* BreakingChange: fix typo in ServerInfoRepresentation

* BreakingChange: rename RetrospectTokenResult to IntrospectTokenResult

* fix more linter errors

* BreakingChange: Bugfix - Issue #358 CreateClientRepresentation does now require a token

* upgrade for keycloak 19

* update CI

* jub

* cleanup

* add SendVerifyEmail function

* test

* Fix #248

* Fix realm import (#367)

* Fix realm import

* Fix gocloak-realm

* Add test permissions, policy

* Change JS policies to client, remove test for uploading JS policy

* Fix register client tests

Co-authored-by: Pavol Ipoth <pavol.ipoth@external.t-systems.com>

* fix tests (#379)

* fix tests

* Fix Comment go-linter

* update dependencies and add nancy ignore case

* Add -d to make file

Co-authored-by: Jonas Heinemann <jonas.heinemann@clarilab.de>

* upgrade gocloak version (#380)

Co-authored-by: Tobias Theel <tt@fino.digital>
Co-authored-by: p53 <pavol.ipoth@protonmail.com>
Co-authored-by: Pavol Ipoth <pavol.ipoth@external.t-systems.com>
Co-authored-by: Jonas <57955592+JonasHeinemann@users.noreply.github.com>
Co-authored-by: Jonas Heinemann <jonas.heinemann@clarilab.de>
Co-authored-by: WilliPkv <105049959+WilliPkv@users.noreply.github.com>
  • Loading branch information
7 people committed Oct 19, 2022
1 parent b4b5d20 commit 18f0f3d
Show file tree
Hide file tree
Showing 16 changed files with 1,396 additions and 1,739 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v3.0.0
with:
go-version: 1.18
go-version: 1.19
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
Expand All @@ -20,8 +20,7 @@ jobs:
uses: sonatype-nexus-community/nancy-github-action@main
- name: Run Keycloak
run: |
docker pull jboss/keycloak:12.0.3
docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=secret -e KEYCLOAK_IMPORT=/tmp/gocloak-realm.json -v "`pwd`/testdata/gocloak-realm.json:/tmp/gocloak-realm.json" -p 8080:8080 --name keycloak jboss/keycloak:12.0.3 -Dkeycloak.profile.feature.upload_scripts=enabled
make start-keycloak
sleep 15
- name: Unit Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .nancy-ignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CVE-2019-11840
CVE-2022-32149
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM quay.io/keycloak/keycloak:latest
COPY testdata data/import
WORKDIR /opt/keycloak
ENV KC_HOSTNAME=localhost
ENV KEYCLOAK_USER=admin
ENV KEYCLOAK_PASSWORD=secret
ENV KEYCLOAK_ADMIN=admin
ENV KEYCLOAK_ADMIN_PASSWORD=secret
ENV KC_FEATURES=account-api,account2,authorization,client-policies,impersonation,docker,scripts,upload_scripts
RUN /opt/keycloak/bin/kc.sh import --file /data/import/gocloak-realm.json
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
test:
./run-tests.sh


start-keycloak:
docker-compose down
docker-compose up -d
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ For release notes please consult the specific releases [here](https://github.com
### Installation

```shell
go get github.com/Nerzal/gocloak/v11
go get github.com/Nerzal/gocloak/v12
```

### Importing

```go
import "github.com/Nerzal/gocloak/v11"
import "github.com/Nerzal/gocloak/v12"
```

### Create New User
Expand Down
Loading

0 comments on commit 18f0f3d

Please sign in to comment.