OpenIotOrg / openiot

The Open Source Project for the Internet of Things
461 stars 189 forks source link

Application Not Authorized to Use CAS The application you attempted to authenticate to is not authorized to use CAS. #120

Closed 9Khaled9 closed 8 years ago

9Khaled9 commented 8 years ago

Hello, my previews bug affect the rest of my application in the OpenIoT Platform... i successfully deploy:

  1. Lsm-light Server
  2. Security Management and Server
  3. Scheduler Core
  4. SDUM Core
  5. ui.requestDefinition
  6. ui.requestPresentation
  7. ui.schemaeditor
  8. Ide Core

and that links open normally:

  1. http://localhost:8080/lsm-light.server
  2. https://localhost:8443/openiot-cas
  3. http://localhost:8080/security.management
  4. http://localhost:8080/scheduler.core/rest/services
  5. http://localhost:8080/sdum.core/rest/services
  6. http://localhost:8080/ui.requestDefinition
  7. http://localhost:8080/ui.requestPresentation
  8. http://localhost:8080/ui.schemaeditor
  9. http://localhost:8080/ide.core

The problem is that when i try to login in https://localhost:8443/openiot-cas/login page, or in http://localhost:8080/security.management/ page, or to open application in http://localhost:8080/ui.requestDefinition/ page, or to open request presentation in http://localhost:8080/ui.requestPresentation/ page, or to login to schema editor in http://localhost:8080/ui.schemaeditor/ page, or to press any link in http://localhost:8080/ide.core/home.jsf page, i get the same error:

Application Not Authorized to Use CAS The application you attempted to authenticate to is not authorized to use CAS. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The JBoss server return errors in command prompt, for example: untitled1 untitled2

Can anyone help me please??? Is there a file to edit it ???? Thanks in advance...

jpcik commented 8 years ago

it looks like a config problem, although not sure exactly where. Please take a look at the configuration of CAS: https://github.com/OpenIotOrg/openiot/wiki/Security-Use-Server

also check https://github.com/OpenIotOrg/openiot/wiki/Security-Use-Client

and the security-config.ini file

milangroshev commented 8 years ago

did you solve the problem ?

9Khaled9 commented 8 years ago

Not yet ... I'm still trying to solve it

milangroshev commented 8 years ago

you can access the http://localhost:8080/security.management only from your local enviroment, you can not acess it for outside. When i try to access from my browser to the virtual machine i get the same error but when i access form inside the VM it is working.

so the solution is to access directly form the VM , if you use linux server without GUI , install xterm then the browser and access http://localhost:8080/security.management :D

9Khaled9 commented 8 years ago

Thank you milangroshev, i have resolved it some other way..

milangroshev commented 8 years ago

can you share how ? because i need to resolve it still :D i want to access OpenIoT form any browser not just the local one ...

please share the solution :D

9Khaled9 commented 8 years ago

While reading the issue of Zoya2385 (http://localhost:8080/lsm-light.server/ not working #116), I noticed the response of Nikos Kefalakis: "Dear Zoya, Since you are working on localhost you should replace all the properties pointing to "lsm.deri.ie" with the "localhost" (as you corectly did for LSM-Light properties). For example i see that the "security.lsm.graphURL" points to "http://lsm.deri.ie/OpenIoT/OAuth#" I hope this will help. Nikos." So i replaced all properties pointing to "lsm.deri.ie" with the "localhost" in openiot.properties since i work locally, and then the CAS server accepted localhost request (or 127.0.0.1 client).

Hope to be useful for you and be your solution...

milangroshev commented 8 years ago

for local host is working also for me , but i want to make it public. I want to be able to access the web gui from my desktop.

premjayaraman commented 8 years ago

to have openiot run on public ip, you will need to do the following

  1. configure JBOSS SSL to generate a certification for the public IP (see the wiki on how to do this) you will need to add the -ext option for public IP to work
  2. test JBOSS to ensure you are able to connect to it using hte public IP
  3. update the openiot.properties and the security.config file with IP address instead of localhost
  4. restart JBOSS and test hope this helps

/prem

On Sat, May 7, 2016 at 12:40 AM, milangroshev notifications@github.com wrote:

for local host is working also for me , but i want to make it public. I want to be able to access the web gui from my desktop.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/OpenIotOrg/openiot/issues/120#issuecomment-217458257

wachoo commented 6 years ago

I deal it with rewritting this file: classes/services/Apereo-10000002.json "serviceId" : "^https://www.apereo.org" ---> "serviceId" : "^http.*"