Bug 328277 - [services] [uaa] handle @Authorize annotation in injection engine
Summary: [services] [uaa] handle @Authorize annotation in injection engine
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: E4 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 330671
Blocks:
  Show dependency tree
 
Reported: 2010-10-20 14:12 EDT by Erdal Karaca CLA
Modified: 2012-12-13 15:00 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erdal Karaca CLA 2010-10-20 14:12:05 EDT
Once an authorisation service is available, it would be convenient to annotate specific 'execution join points' (in AspectJ this is for instance a method execution) to authorize its usage.

E.g.:

@Permission
public void executeMyMagicMethod() {
  // execute code that must be authorized
}

The injection engine would have to resolve an/the authorisation service instance (from the IEclipseContext) and call its authorise method.

There are plenty of other join points where the Permisssion annotation could be used such as the other core annotations...
Comment 1 Erdal Karaca CLA 2010-10-20 15:02:36 EDT
Just a note: The 'Permission' identifier is already in use by the authentication service (in UAA services API)... so, it should be called @Authorize...
Comment 2 Paul Webster CLA 2010-11-19 08:04:46 EST
One of the things discussed was the basic concept of a User and their Roles.  Once that's in place, then roles would be assigned to various places in the model.  Ex, a Part Descriptor, or a Part in a stack, or a Command or a MenuContribution.

Consumers of those pieces of the model would have to validate their behavior (is it visible to this user, can this user execute it) based on matching roles.

PW
Comment 3 Oleg Besedin CLA 2010-11-19 10:52:52 EST
I'd rather call it "@Privileged(String permission)" to be in line with the rest of Java.

I don't think it ties well into injection. Rather, I'd prefer to see an analog of "doPrivileged()" method, maybe, tied to an Eclipse context.