Additionally, I forgot to mention that I have added to the 
"C:\etc\cas\services" folder the "myservice-1001.json" file with the 
following content:

{
  "@class" :            "org.apereo.cas.services.RegexRegisteredService",
  "serviceId" :         "^https://www.example.com";,
  "name" :              "HTTPS/IMAPS wildcard",
  "id" :                     1001,
  "evaluationOrder" :   99999,
  "theme" :             "mytheme"
}

---
Thanks.
  Pedro Rosas


On Sunday, September 23, 2018 at 7:58:41 PM UTC+1, Pedro Rosas wrote:
>
> Hi Andy,
>
> I am using tomcat on Windows 10.
> I'm also using the Netbeans IDE to load the cas overlay (maven version).
>
> I created the C:\etc\cas\config and I have put there the cas.properties, 
> with the following content:
>
> cas.server.name: https://cas.example.org:8443
> cas.server.prefix: https://cas.example.org:8443/cas
> cas.adminPagesSecurity.ip=127\.0\.0\.1
> logging.config: file:/etc/cas/config/log4j2.xml
> cas.serviceRegistry.initFromJson: true
> cas.serviceRegistry.json.location: file:/etc/cas/services
>
> But, I'm still not getting it to work.
> This is what I get on the log file:
>
> 2018-09-23 19:43:29,301 WARN 
> [org.apereo.cas.config.CasCoreServicesConfiguration] - <Runtime memory is 
> used as the persistence storage for retrieving and persisting service 
> definitions. Changes that are made to service definitions during runtime 
> WILL be LOST when the web server is restarted. Ideally for production, you 
> need to choose a storage option (JDBC, etc) to store and track service 
> definitions.>
> 2018-09-23 19:43:29,367 INFO 
> [org.apereo.cas.services.AbstractServicesManager] - <Loaded [0] service(s) 
> from [InMemoryServiceRegistry].>
>
>
> And when I try to access 
> http://localhost:8080/cas-overlay/login?service=https://www.example.com
> I always get the message:
>
> *The services registry of CAS is empty and has no service definitions. 
> Applications that wish to authenticate with CAS must explicitly be defined 
> in the services registry.*
>
> I'm running out of ideas....
> How could I get this running? Maybe using application.yml instead?
>
> Thanks.
> Best Regards,
>   Pedro Rosas
>
>
> On Sunday, September 23, 2018 at 2:00:22 PM UTC+1, Andy Ng wrote:
>>
>> Hi Pedro,
>>
>> I'm editing the cas.properties provided by the CAS overlay template.
>> Do you mean that this is the wrong place to edit the cas.properties?
>> > Yes, it is the wrong place to edit the cas.properties
>>
>> Should I manually copy the cas.properties file to the "target" folder? 
>> (I'm using tomcat).
>> > No
>>
>> Where should the file be placed exactly?
>> > So you are using tomcat correct? Do you have access to the server? If 
>> so, create a folder directory like this
>> */etc/cas/config*
>>
>> and then copy the cas.properties file into the above directory. (finally 
>> should be /etc/cas/config/cas.properties)
>> And... If you are using Windows, the directory should be C:/etc/cas/config
>>
>> It is by design that the cas.properties is not included in your cas.war, 
>> so the properties can be separated from your build. 
>> If you need to include your properties inside your war file, consider 
>> adding them inside application.yml
>>
>> Cheers!
>> - Andy
>>
>>
>>
>>
>>
>> On Sunday, 23 September 2018 19:24:43 UTC+8, Pedro Rosas wrote:
>>>
>>> Hi Andy,
>>>
>>> I'm editing the cas.properties provided by the CAS overlay template.
>>> Do you mean that this is the wrong place to edit the cas.properties?
>>>
>>> I searched for a cas.properties file on the "target" folder, but there 
>>> is no such file there.
>>> Should I manually copy the cas.properties file to the "target" folder? 
>>> (I'm using tomcat).
>>> Where should the file be placed exactly?
>>>
>>> Thanks.
>>> Best Regards,
>>>   Pedro Rosas
>>>
>>>
>>> On Sunday, September 23, 2018 at 10:09:37 AM UTC+1, Andy Ng wrote:
>>>>
>>>> Hi Pedro,
>>>>
>>>> To see whether or not your service is being loaded, turn on CAS 
>>>> debugger mode and look at the logs. 
>>>>
>>>> The (cas.serviceRegistry.xxxxx.location) is *based on CAS version*, so 
>>>> you should look for the config for your CAS version:
>>>> cas.serviceRegistry.json.location=file:/etc/cas/services [CAS 5.3.x 
>>>> https://apereo.github.io/cas/5.3.x/installation/Configuration-Properties.html#json-service-registry
>>>> ]
>>>> cas.serviceRegistry.config.location: file:/etc/cas/services [CAS 5.1.x 
>>>> https://apereo.github.io/cas/5.1.x/installation/Configuration-Properties.html#resource-based-jsonyaml-service-registry
>>>> ]
>>>> In your case [cas.serviceRegistry.json.location=file:/etc/cas/services] 
>>>> is correct.
>>>>
>>>> On possible issue might be the location of your cas.properties:
>>>> Your cas.properties need to be *on your server* instead of inside your 
>>>> source code, if you only edit the cas.properties provided by CAS War 
>>>> Overlay and compile it into your cas.war, it will have no effect to your 
>>>> CAS server.
>>>>
>>>> Cheers!
>>>> -Andy
>>>>
>>>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/9e186abf-7dbe-4467-8954-b2f49be2d018%40apereo.org.

Reply via email to