Servlet License Server

Having trouble installing Oxygen? Got a bug to report? Post it all here.
sderrick
Posts: 264
Joined: Sat Jul 10, 2010 4:03 pm

Servlet License Server

Post by sderrick »

I got the floating license.

Deployed your license servlet on our tomcat server. Same server that serves the oxygen editor applet.

I ran through the license registration process and the license servlet says.
Activation status

The license server is activated.
I changed the factory.init to

Code: Select all


factory.init(frameworkZips, optionsZipURL, codeBase, appletID,
// //The servlet URL
"http://www.host:8080/oxygenLicenseServlet/license-servlet",
// //The HTTP credentials user name
"user",
// //The HTTP credentials password
"password");
with host, user and password replaced with the correct stuff. user/password are in the tomcat-users.xml file with the role of "standard"
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="standard"/>
<role rolename="manager"/>
.
.
.
<user username="user" password="password" roles="standard"/>
<user username="usrMan" password="password" roles="manager"/>
</tomcat-users>
I can log into the license server using the username=userMan with the manager role.

The license server says no mater how many times I try to get a license
Total licenses
1
Used licenses
0
Available licenses
1
Rejected requests
0
Acknowledged requests
0
I think I'm getting a LIC response, which may indicate a Log In Credential problem? The text in the error dialog is cut off, so I'm not sure.

thanks,

No errors in the tomcat or oxygenlicenseserver logs.

is there a way for me to pass the username and password to the url

http://mbepapers.org:8080/oxygenLicense ... se-servlet

to test if my name/password setup in the tomcat-users.xml file is working?

thanks

Scott


Scott
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Servlet License Server

Post by adrian »

Hi,
sderrick wrote:No errors in the tomcat or oxygenlicenseserver logs.

is there a way for me to pass the username and password to the url

http://mbepapers.org:8080/oxygenLicense ... se-servlet

to test if my name/password setup in the tomcat-users.xml file is working?
First, if you are logged into Tomcat as admin, restart your browser (or use a different web browser), so that it resets the authentication (otherwise it won't prompt you).

For testing the license server in the web browser you can use a URL like this (Oxygen appends specific parameters when it requests a license):

Code: Select all

http://hostname:port/oXygenLicenseServlet/license-servlet?action=LIC_REQUEST&name=test&hostname=test
An authentication dialog will pop up in the browser and ask you for the credentials. Try the "user" credentials. If it doesn't work with "user" there may be a problem with the Tomcat user, so try with your admin account, "usrMan".

This will request a license from the server, so you should see in the reply a license being granted (LIC_GRANTED followed by a session ID and the key). A license is consumed on the license server report page (User Name: test, Hostname: test). After a minute (timeout) the license requested this way will be freed by the server because there is no keep-alive (the client from Oxygen does that).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sderrick
Posts: 264
Joined: Sat Jul 10, 2010 4:03 pm

Re: Servlet License Server

Post by sderrick »

Using the manager role login creds fixed it!

thanks,

Scott
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Servlet License Server

Post by adrian »

Hi,

I must mention that using a user with the manager role for the license servlet client authentication isn't recommended in production, I only suggested that for testing purposes.
So, in the long run, you would have to identify the reason the Tomcat user with the standard role did not work.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sderrick
Posts: 264
Joined: Sat Jul 10, 2010 4:03 pm

Re: Servlet License Server

Post by sderrick »

I figured out why I couldn't use the "standard" role to request a license as your documentation explains.

The "standard" role is not defined in the servers security constraint, user, admin and manager are defined for that!

from the servers web.xml file
<!-- Define a constraint to restrict access to /license-servlet -->
<security-constraint>
<display-name>Security constraint for the /license-servlet folder</display-name>
<web-resource-collection>
<web-resource-name>Licensing Area</web-resource-name>
<url-pattern>/license-servlet</url-pattern>

<!-- If you list http methods, only those methods are protected. -->
<!-- Leave this commented out to protect all access -->
<!--
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
-->
</web-resource-collection>
<auth-constraint>
<!-- All user, manager or admin can access this area -->
<role-name>user</role-name>
<role-name>admin</role-name>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
Post Reply