Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
9Khaled9 opened this issue Apr 20, 2016 · 10 comments

Comments

@9Khaled9
Copy link

9Khaled9 commented Apr 20, 2016

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
Copy link
Member

jpcik commented Apr 20, 2016

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
Copy link

did you solve the problem ?

@9Khaled9
Copy link
Author

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

@milangroshev
Copy link

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
Copy link
Author

9Khaled9 commented May 3, 2016

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

@milangroshev
Copy link

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
Copy link
Author

9Khaled9 commented May 4, 2016

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
Copy link

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
Copy link
Contributor

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
#120 (comment)

@wachoo
Copy link

wachoo commented Mar 15, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants