Mode changes due to continued development.
This commit is contained in:
parent
119e217e4b
commit
89b3c7a09c
@ -96,7 +96,9 @@ $(BUILDDIR)/%.class: %.java
|
|||||||
|
|
||||||
$(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
|
$(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
|
||||||
@echo [======== Creating Webapp $@ ========]
|
@echo [======== Creating Webapp $@ ========]
|
||||||
cp WebContent/WEB-INF/web.xml $(BUILDDIR)/webapp/WEB-INF/web.xml
|
cp src/com/novell/casa/authtoksvc/web.xml $(BUILDDIR)/webapp/WEB-INF/web.xml
|
||||||
|
cp src/com/novell/casa/authtoksvc/Krb5_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/Krb5Authenticate/mechanism.settings
|
||||||
|
cp src/com/novell/casa/authtoksvc/Pwd_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate/mechanism.settings
|
||||||
cp $(IDENT_ABSTRACTION_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/
|
cp $(IDENT_ABSTRACTION_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/
|
||||||
cp $(IDENT_ABSTRACTION_DEPENDANCIES_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/
|
cp $(IDENT_ABSTRACTION_DEPENDANCIES_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/
|
||||||
jar cvf $(BUILDDIR)/$(WEBAPP) -C $(BUILDDIR)/webapp .
|
jar cvf $(BUILDDIR)/$(WEBAPP) -C $(BUILDDIR)/webapp .
|
||||||
@ -114,6 +116,11 @@ $(BUILDDIR):
|
|||||||
[ -d $(BUILDDIR)/webapp/WEB-INF/classes ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/classes
|
[ -d $(BUILDDIR)/webapp/WEB-INF/classes ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/classes
|
||||||
[ -d $(BUILDDIR)/webapp/WEB-INF/lib ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/lib
|
[ -d $(BUILDDIR)/webapp/WEB-INF/lib ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/lib
|
||||||
[ -d $(BUILDDIR)/webapp/WEB-INF/conf ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf
|
[ -d $(BUILDDIR)/webapp/WEB-INF/conf ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf
|
||||||
|
[ -d $(BUILDDIR)/webapp/WEB-INF/conf/enabled_services ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf/enabled_services
|
||||||
|
[ -d $(BUILDDIR)/webapp/WEB-INF/conf/auth_mechanisms ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf/auth_mechanisms
|
||||||
|
[ -d $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms
|
||||||
|
[ -d $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/Krb5Authenticate ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/Krb5Authenticate
|
||||||
|
[ -d $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate ] || mkdir -p $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate
|
||||||
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
|
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
|
||||||
[ -d $(CASALIBDIR)/java ] || mkdir -p $(CASALIBDIR)/java
|
[ -d $(CASALIBDIR)/java ] || mkdir -p $(CASALIBDIR)/java
|
||||||
|
|
||||||
|
@ -254,14 +254,6 @@ public class Authenticate implements RpcMethod
|
|||||||
{
|
{
|
||||||
System.err.println("Authenticate.init()- SecurityException accessing " + mechanismsConfigFolder + " Exception=" + e.toString());
|
System.err.println("Authenticate.init()- SecurityException accessing " + mechanismsConfigFolder + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
/*// tbd - make pluggable.
|
|
||||||
AuthMechanism krb5Mech = new Krb5Authenticate();
|
|
||||||
krb5Mech.init(svcConfig);
|
|
||||||
m_authMechanismMap.put(krb5Mech.getId(), krb5Mech);
|
|
||||||
|
|
||||||
AuthMechanism pwdMech = new PwdAuthenticate();
|
|
||||||
pwdMech.init(svcConfig);
|
|
||||||
m_authMechanismMap.put(pwdMech.getId(), pwdMech);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -39,6 +39,7 @@ import javax.naming.directory.BasicAttributes;
|
|||||||
import javax.naming.directory.DirContext;
|
import javax.naming.directory.DirContext;
|
||||||
import javax.naming.directory.InitialDirContext;
|
import javax.naming.directory.InitialDirContext;
|
||||||
import javax.naming.directory.SearchResult;
|
import javax.naming.directory.SearchResult;
|
||||||
|
import javax.naming.directory.SearchControls;
|
||||||
|
|
||||||
import org.ietf.jgss.GSSContext;
|
import org.ietf.jgss.GSSContext;
|
||||||
import org.ietf.jgss.GSSCredential;
|
import org.ietf.jgss.GSSCredential;
|
||||||
@ -198,10 +199,13 @@ public class Krb5Authenticate implements AuthMechanism, Serializable
|
|||||||
DirContext ctx = new InitialDirContext(env);
|
DirContext ctx = new InitialDirContext(env);
|
||||||
|
|
||||||
// Now search for a user with a matching kerberos principal name
|
// Now search for a user with a matching kerberos principal name
|
||||||
Attributes matchAttrs = new BasicAttributes(true); // ignore attribute name case
|
SearchControls controls = new SearchControls();
|
||||||
matchAttrs.put(new BasicAttribute("krbPrincipalName", krb5Token.getPrincipalName()));
|
controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
|
||||||
|
|
||||||
NamingEnumeration answer = ctx.search(m_svcConfig.getSetting(SvcConfig.StartSearchContext), matchAttrs);
|
NamingEnumeration answer = ctx.search(m_svcConfig.getSetting(SvcConfig.StartSearchContext),
|
||||||
|
"(krbPrincipalName={0})",
|
||||||
|
new String[] {krb5Token.getPrincipalName()},
|
||||||
|
controls);
|
||||||
|
|
||||||
// Proceed based on the result of the search
|
// Proceed based on the result of the search
|
||||||
if (answer.hasMore())
|
if (answer.hasMore())
|
||||||
|
Loading…
Reference in New Issue
Block a user