This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 200299 - [sec] extensible login modules
Summary: [sec] extensible login modules
Status: NEW
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Security (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Security Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 207368
  Show dependency tree
 
Reported: 2007-08-17 01:18 EDT by Scott Lewis CLA
Modified: 2019-09-06 16:13 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Lewis CLA 2007-08-17 01:18:38 EDT
The current JAAS/Equinox integration work allows LoginModules to be added to the JAAS login sequence.  It would also be desireable to have extensible login modules, so that plugins could provide Principals and/or Credentials to existing login modules (e.g. the one(s) used for Eclipse).
Comment 1 Oleg Besedin CLA 2008-01-22 16:16:06 EST
There are org.eclipse.equinox.security.auth.credentials:

IPrivateCredential
IPublicCredential
IRole

And org.eclipse.equinox.security.auth.credentials.spi:

CredentialsFactory

The idea would be that once login is successful, Subject gets public/private credentials added (and logout removes corresponding credentials).

Scott, is this what you are looking for?

(For example, see AskLoginModule)
Comment 2 Scott Lewis CLA 2008-01-22 16:46:15 EST
(In reply to comment #1)
> There are org.eclipse.equinox.security.auth.credentials:
> 
> IPrivateCredential
> IPublicCredential
> IRole
> 
> And org.eclipse.equinox.security.auth.credentials.spi:
> 
> CredentialsFactory
> 
> The idea would be that once login is successful, Subject gets public/private
> credentials added (and logout removes corresponding credentials).
> 
> Scott, is this what you are looking for?
> 
> (For example, see AskLoginModule)
> 

Hi Oleg,

> The idea would be that once login is successful, Subject gets public/private
> credentials added (and logout removes corresponding credentials).
> 
> Scott, is this what you are looking for?


Yes, partially.   I would also like to be able to add Principals for a given subject (e.g. Subject.getPrincipals().add(ID)).  The use case for this is that we would like to add ECF IDs (an interface that extends Principal) to the principals associated with a Subject, before the Subject is set to read only (which typically happens in the login commit I believe).

The use case for us is this...we use IDs to represent 'accounts/identities' on remote services...e.g. xmpp://slewis@ecf.eclipse.org.  It would be nice to be able to add Principals/IDs/accounts via Subject.getPrincipals().add(ID) and add credentials via Subject.getPrivateCredentials().add(String) both during login (i.e. before these are set to read-only via Subject.setReadOnly()).

Then, at later times (e.g. when user initiates a download from site requiring authentication, we would be able to get accounts and associated credentials via the Subject.getPrincipals(<class>) and Subject.getPrivateCredentials(<class>).  These could then be used to authenticate to a given target upon IContainer.connect(ID targetID,IConnectContext connectContext)

Does this make sense?  Is there a better way to accomplish this same goal?

BTW, where is AskLoginModule?




Comment 3 Matt Flaherty CLA 2008-03-10 16:07:12 EDT
Moving to security component.
Comment 4 Eric W Li CLA 2008-10-28 14:57:54 EDT
Scott,

I think this is a good point to look at the integration of Eclipse Higgins/identity management framework into ECF.  Having extension points around the LoginModule is not a good solution for security reason.  I will ask Matt to provide you the contact information of Higgins folks.

-eric
Comment 5 Scott Lewis CLA 2008-10-28 15:16:50 EDT
(In reply to comment #4)
> Scott,
> 
> I think this is a good point to look at the integration of Eclipse
> Higgins/identity management framework into ECF.  Having extension points around
> the LoginModule is not a good solution for security reason.  I will ask Matt to
> provide you the contact information of Higgins folks.
> 
> -eric
> 

I don't think that Higgins is going to meet the needs here.  I'm familiar with the project (and was a committer some time ago).  We have our notion of identity (e.g. org.eclipse.ecf.core.identity.*) and I don't see Higgins' work as fundamentally replacing that (Higgins can/could be an org.eclipse.ecf.namespace provider, but I haven't got them to make that implementation as yet).

I would like to understand what you mean by 'not a good solution for security reasons'.  I understand that the eclipse extension registry has no security associated with it (i.e. any bundle can add extensions, and hostile bundles could add an extension that defeated security), but couldn't this be dealt with in some other way?  (e.g. require that the contributor be a framework extension, or use OSGi services instead of extension registry...or something else?)

Comment 6 Eric W Li CLA 2008-10-29 15:36:07 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > Scott,
> > 
> > I think this is a good point to look at the integration of Eclipse
> > Higgins/identity management framework into ECF.  Having extension points around
> > the LoginModule is not a good solution for security reason.  I will ask Matt to
> > provide you the contact information of Higgins folks.
> > 
> > -eric
> > 
> 
> I don't think that Higgins is going to meet the needs here.  I'm familiar with
> the project (and was a committer some time ago).  We have our notion of
> identity (e.g. org.eclipse.ecf.core.identity.*) and I don't see Higgins' work
> as fundamentally replacing that (Higgins can/could be an
> org.eclipse.ecf.namespace provider, but I haven't got them to make that
> implementation as yet).
> 
> I would like to understand what you mean by 'not a good solution for security
> reasons'.  I understand that the eclipse extension registry has no security
> associated with it (i.e. any bundle can add extensions, and hostile bundles
> could add an extension that defeated security), but couldn't this be dealt with
> in some other way?  (e.g. require that the contributor be a framework
> extension, or use OSGi services instead of extension registry...or something
> else?)
> 

When you add Principals/IDs/accounts via Subject.getPrincipals().add(ID) via Subject.getPrincipals().add(ID), wouldn't other bundles be able to retrieve password credentials through Subject?

Comment 7 Scott Lewis CLA 2008-10-29 16:47:35 EDT
(In reply to comment #6)
<stuff deleted>
> 
> When you add Principals/IDs/accounts via Subject.getPrincipals().add(ID) via
> Subject.getPrincipals().add(ID), wouldn't other bundles be able to retrieve
> password credentials through Subject?

Yes...but couldn't other bundles (that are installed/running) just access the SecurePreferences associated with another bundle (and get to the credentials that way?  That is, I believe that I could write a plugin that gets the CVS passwords stored by the CVS provider and do stuff with them...even without getting them via the Subject.  If there isn't a way to prevent this (for trusted bundles anyway), then I don't see the access to the Subject credentials as any more dangerous.

If I'm misunderstanding please LMK.






Comment 8 Eclipse Webmaster CLA 2019-09-06 16:13:27 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.