vzakharchenko / keycloak-radius-plugin

Make the radius server as part of keycloak SSO
Apache License 2.0
188 stars 46 forks source link

"keycloak-radius-plugin" programe need to run with "free radius" programe? #433

Open coolbobo opened 2 years ago

coolbobo commented 2 years ago

i have two question, need you help. 1.When I run the expamle program "Assign attributes dynamically using javascript policy", do I need to run "keyclock-radius-plugin" + "free radius" , or just need to run the "keycloak-radius-plugin"?

  1. when i only run the "keycloak-radius-plugin" programe, then run example program "Assign attributes dynamically using javascript policy", find out the error information: "Error: Timed out after 2500ms(1 retries) thank you very much.
vzakharchenko commented 2 years ago
  1. "free radius" is Not needed, keycloak-radius-plugin uses the embedded version of radius server.
  2. How you run application? I suggest to use docker, because it provides a fully configured server.
    cd Examples/RadiusAuthorizationJSExample
    docker run -p 8090:8080 -p1812:1812/udp -p1813:1813/udp -e JAVA_OPTS="-Dkeycloak.profile.feature.scripts=enabled -Dkeycloak.profile.feature.upload_scripts=enabled -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true" -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin  -v `pwd`/.:/example  -e KEYCLOAK_IMPORT=/example/authorization-realm.json  vassio/keycloak-radius-plugin

Keycloak master credentials admin/admin Radius credentials (keycloak Realm: radius-authorization-example): testuser/testUser

coolbobo commented 2 years ago

i have slove the problem, thank you very much. another problem: Does "keycloak-radius-plugin" have portal function ?

vzakharchenko commented 2 years ago

What do you mean about portal function? If you mean Radius Hotspot then yes, "keycloak-radius-plugin" have portal function.

Here example for Mikrotik: https://github.com/vzakharchenko/mikrotik-hotspot-oauth

If need limit users you can assign Radius attribute to USER/ROLE/GROUP/RESOURCE

here example for Mikrotik:

Mikrotik-Rate-Limit = 1024k/1024k