cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to extend webscript authentication?

pmverma
Champ in-the-making
Champ in-the-making
Hi all, we have guest, none, user, admin authentication in webscripts.

I like to extends it to add my custom authentication.

How to extend it?

Is it possible?

Thanks in advance.
4 REPLIES 4

abarisone
Star Contributor
Star Contributor
Hi,
as reported here http://wiki.alfresco.com/wiki/Web_Scripts#Creating_a_Description_Document I think you can only use the following value for the authentication parameter in the description file

authentication (optional) is the required level of authentication; valid values are:
  • none specifies that no authentication is required at all

  • guest specifies that at least guest authentication is required

  • user specifies that at least named user authentication is required

  • admin specifies that at least a named admin authentication is required
Note 1: if not specified, the default value is none
Note 2: The optional runas attribute can be used to force the execution of a web script as a specific user. This can only be specified for web scripts that are stored in the Java Class path.

Look carefully to note 2: you can set an authentication level on the execution of the webscript, but you can decide that certain part of it can be executed as another user.
Moreover you can also extend the access levels to nodes modifying the permissionDefinitions.xml under WEB_INF/classes/alfresco/model in order to have your custom security level for a user, other that Coordinator, Collaborator, etc.
It depends on what you need…

pmverma
Champ in-the-making
Champ in-the-making
Thank you  abarisone for your reply,

Actually, I am looking for something through/by which i can add another authentication level,

I really do not find any Ref. on how to extend authentication level .

Or it is hard coded in webscripts api ?

Anyone else….who can point me?

pjaromin
Champ on-the-rise
Champ on-the-rise
I'm looking to do the very same thing. Just began digging into this a few moments ago.

Can anyone help shortcut the process by pointing to where/how these desc.xml docs are parsed and what it uses to expand the symbols?

If I work this out on my own before someone responds I'll post here…but I'd certainly appreciate a head start.

Thanks!

-Patrick

pjaromin
Champ on-the-rise
Champ on-the-rise
Didn't take long to work out that it looks to be rather involved and likely impractical. The authentication value options are coded in an enum (Description.RequiredAuthentication) that is used in numerous places…making it very difficult to add a new one.