Build and Start
- build and run keycloak
1.1 docker
1.2 release
- download and unzip keycloak-radius.zip (https://github.com/vzakharchenko/keycloak-radius-plugin/releases) - unzip keycloak-radius.zip -d keycloak-radius - cd keycloak-radius - sh bin/standalone.sh -Dkeycloak.profile.feature.upload_scripts=enabled -c standalone.xml -b 0.0.0.0 -Djboss.bind.address.management=0.0.0.0 --debug 8190 -Djboss.http.port=8090
1.3 Developsudo apt-get install net-tools # Only once cd keycloak ./init.sh # Only once ./buildAndStart.sh
- open http://localhost:8090/auth/ and initialize master realm with login/password.
- open Administration Console
- import realm from file Realm.json
User | password | ROLE |
---|---|---|
rejectUser | rejectUser | REJECT_ROLE |
acceptUser | acceptUser | ACCEPT_ROLE |
ROLE | ATTRIBUTES |
---|---|
REJECT_ROLE | REJECT_NAS-IP-Address = 192.168.88.1 |
ACCEPT_ROLE | ACCEPT_NAS-IP-Address = 192.168.88.1 |
- install example
cd Examples/ConditionAccessRequestJSExample npm i npm run start
- open http://localhost:3001/
- type login and password
- click the "connect To Radius Server"
User | password | NAS-IP-Address | Test Status |
---|---|---|---|
rejectUser | rejectUser | 192.168.88.1 | REJECT |
rejectUser | rejectUser | 192.168.88.2 | ACCEPT |
acceptUser | acceptUser | 192.168.88.1 | ACCEPT |
acceptUser | acceptUser | 192.168.88.2 | REJECT |