Skip to content

Commit

Permalink
Release (#16)
Browse files Browse the repository at this point in the history
* release (#15)

* Eoepca 910 um keycloak develop an identity api based on keycloak api (#9)

* feat: keycloak_client methods added for identity_api

* feat: added scopes crud (for future?) and fixes on permissions and policies cruds

* Merge (#10)

* Update docker compose

* Fix keycloak client constructor

* Update README.md

* Update docker compose

* Add nginx config

* Change nginx

* Add realm admin role

* Remove auth keycloak client (#11)

* Add dummy service demo

* Add dummy-service nginx

* Update demos

* Update nginx configs

* Update gatekeeper config

* feat: added register_general_policy function

* fix: small fix in register_general_policy

* fix: one more fix

* feat: added delete permissions

* feat: added create client function

* Add gatekeeper cookie name

* Improve create client script

* feat: added inputs to script but not working yet

* Update create-client.sh

* Update create-client.sh

* Update create-client.sh

* Update create-client.sh

* Update create-client.sh

* Update create-client.sh

* Update create-client.sh

* Fix issues

* Improve create client script

* Fix issue

* Fix keycloak client

* Cleanup and reformat

---------

Co-authored-by: flaviorosadme <[email protected]>
Co-authored-by: flaviorosadme <[email protected]>

* Cleanup

---------

Co-authored-by: flaviorosadme <[email protected]>
Co-authored-by: flaviorosadme <[email protected]>
  • Loading branch information
3 people authored Nov 16, 2023
1 parent b5b2e05 commit d11cd7f
Show file tree
Hide file tree
Showing 5 changed files with 2,286 additions and 32 deletions.
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Testing](#testing)
- [Documentation](#documentation)
- [Usage](#usage)
- [Roadmap](#roadmap)
Expand Down Expand Up @@ -104,35 +103,40 @@ git clone https://github.com/EOEPCA/um-identity-service.git
cd um-identity-service
```

4. Run with Docker compose
```sh
docker compose up -d --build
```

4. Run with Helm
```sh
helm install identity-service helm
```

## Documentation

The component documentation can be found at https://eoepca.github.io/um-identity-service/.

<!-- USAGE EXAMPLES -->

## Usage

- **Docker-compose:**
`Identity-manager` - http://localhost:4200
`Identity-api` - http://localhost:5566
`Keycloak` - http://localhost:8080
`OAuth2 Proxy` - http://localhost:4180
`Demo app` - http://localhost:7070
`Keycloak` - http://localhost
`Gatekeeper Proxy` - http://localhost:3000
`Identity API` - http://localhost:8080
`Resource server demo` - http://localhost:7072

Add `127.0.0.1 keycloak` to hosts file to be able to run locally.

- **Helm charts:**
`Identity-manager` - https://identity.manager.local.eoepca.org
`Identity-api` - https://identity.api.local.eoepca.org
`Keycloak` - https://identity.keycloak.local.eoepca.org
`OAuth2 Proxy` - https://identity.proxy.local.eoepca.org
`Demo app` - https://identity.demo.local.eoepca.org
`Keycloak` - https://identity.keycloak.nip.io
`Gatekeeper Proxy` - https://identity.proxy.nip.io
`Identity API` - https://identity.api.nip.io
`Resource server demo` - https://identity.demo.nip.io

## Roadmap

See the [open issues](https://github.com/EOEPCA/um-identity-service/issues) for a list of proposed features (and known issues).

<!-- CONTRIBUTING -->

## Contributing

Expand All @@ -149,32 +153,30 @@ Contributions are what make the open source community such an amazing place to b
Debug Helm Charts:

```shell
cd infra/charts/oxauth2-proxy
helm template oauth2-proxy --debug . > oauth2-proxy-charts.log
cd infra/charts/identity-keycloak
helm template identity-keycloak --debug . > keycloak-chart.log
```

```shell
cd infra/charts/keycloak
helm template keycloak --debug . > keycloak-charts.log
cd infra/charts/identity-gatekeeper
helm template identity-gatekeeper --debug . > gatekeeper-chart.log
```

```shell
cd infra/charts/identity-api
helm template identity-api --debug . > identity-api-charts.log
helm template identity-api --debug . > identity-api-chart.log
```

```shell
cd infra/charts/identity-manager
helm template identity-manager --debug . > identity-manager-charts.log
cd infra/charts/identity-postgres
helm template identity-postgres --debug . > postgres-chart.log
```

```shell
cd infra/charts/postgres
helm template postgres --debug . > postgres-charts.log
cd infra/charts/identity-spring-boot-echo
helm template identity-postgres --debug . > spring-boot-echo-chart.log
```

<!-- LICENSE -->

## License

Distributed under the Apache-2.0 License. See `LICENSE` for more information.
Expand Down
4 changes: 2 additions & 2 deletions create-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ where:
"

TEMP=$(getopt -o he:u:p:t: --long id:,name:,description:,default,authenticated,resource:,uris:,scopes:,users:,roles: \
-n $(basename "$0") -- "$@")
-n "$(basename "$0")" -- "$@")

if [ $? != 0 ]; then
exit 1
Expand Down Expand Up @@ -59,7 +59,7 @@ add_resource() {
\"uris\": $(json_array "${resource_uris_array[@]}"),
\"scopes\": $(json_array "${resource_scopes_array[@]}"),
\"permissions\": {
\"authenticated\": "${authenticated}"
\"authenticated\": ${authenticated}
}
}"
else
Expand Down
4 changes: 2 additions & 2 deletions demos/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
networks:
- eoepca_network
echo-gatekeeper:
image: quay.io/gogatekeeper/gatekeeper:2.8.0
image: quay.io/gogatekeeper/gatekeeper:2.8.1
container_name: echo-gatekeeper
ports:
- '3000:3000'
Expand Down Expand Up @@ -110,4 +110,4 @@ volumes:
networks:
eoepca_network:
driver: bridge
name: eoepca_network
name: eoepca_network
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ services:
- KC_DB_PASSWORD=123456
- KC_DB_USERNAME=keycloak
- KC_DB_URL_PORT=5432
entrypoint: /opt/keycloak/bin/kc.sh start-dev
entrypoint: /opt/keycloak/bin/kc.sh start-dev --import-realm
volumes:
- ./keycloak/health-check.sh:/opt/keycloak/health-check.sh
restart: on-failure
- ./realm-demo.json:/opt/keycloak/data/import/realm-demo.json
healthcheck:
test: "bash /opt/keycloak/health-check.sh"
interval: 5s
timeout: 180s
retries: 36
restart: on-failure
postgres:
image: postgres:16.0
container_name: postgres
Expand All @@ -55,7 +56,6 @@ services:
- POSTGRES_PASSWORD=123456
- PGPASSWORD=123
- PGDATA=/var/lib/postgresql/data/keycloak
restart: on-failure
gatekeeper:
image: quay.io/gogatekeeper/gatekeeper:2.8.1
container_name: gatekeeper
Expand Down
Loading

0 comments on commit d11cd7f

Please sign in to comment.