> On 2012-03-12 23:15:42, Alejandro Abdelnur wrote: > > Why not pass as -auth the authenticator class (as it is can be done via ENV > > var as well)? By doing this you wouldn't have to subclass AuthOozieClient > > to add a new authentication. You'd just add the JAR with it and at oozie > > script (if you want to make things easier for users) resolve the class > > based on a an alias -auth foo becomes -auth my.foo.bar
Currently, Yahoo users are using -auth foo to specify the auth mechanism. So, at least, this '-auth foo' has to be supported. > On 2012-03-12 23:15:42, Alejandro Abdelnur wrote: > > /trunk/docs/src/site/twiki/ENG_Custom_Authentication.twiki, line 91 > > <https://reviews.apache.org/r/3069/diff/3/?file=91043#file91043line91> > > > > why this method is needed in the docs? Because I have to do this so server can get cookie. HttpURLConnection conn = super.createConnection(url, method); String t = conn.getRequestProperty("Cookie"); if (t != null) { if (t.indexOf("\"") > -1) { t = t.replaceAll("\"", ""); } conn.setRequestProperty("Cookie", t); } return conn; Also, the singleton config object at each authenticator can be set here. Say, I have this singleton config object at FooAuthenticator. public class FooAuthenticator implements Authenticator public static class FooAuthenticatorConf { private static final FooAuthenticatorConf instance = new FooAuthenticatorConf(); private final Map<String, String> map = new HashMap<String, String>(); private FooAuthenticatorConf() { } public static FooAuthenticatorConf getInstance() { return instance; } public void put(String key, String value) { map.put(key, value); } public String get(String key) { return map.get(key); } public void clear() { map.clear(); } } } It can be set in overrided createConnection(). > On 2012-03-12 23:15:42, Alejandro Abdelnur wrote: > > /trunk/client/src/main/java/org/apache/oozie/client/AuthOozieClient.java, > > line 76 > > <https://reviews.apache.org/r/3069/diff/3/?file=91036#file91036line76> > > > > not to break backwards compatibility, create a new constructor with the > > new signature fixed. > On 2012-03-12 23:15:42, Alejandro Abdelnur wrote: > > /trunk/client/src/main/java/org/apache/oozie/cli/OozieCLI.java, line 182 > > <https://reviews.apache.org/r/3069/diff/3/?file=91035#file91035line182> > > > > *user_defined* does not apply to this code (but, I assume, to a custom > > subclass). this message (at this class) should be 'simple|kerberos' only. fixed. - Angelo K. ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3069/#review5863 ----------------------------------------------------------- On 2012-03-10 03:37:03, Angelo K. Huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/3069/ > ----------------------------------------------------------- > > (Updated 2012-03-10 03:37:03) > > > Review request for oozie. > > > Summary > ------- > > This improvement is mainly to add client parameter options to handle user > specified authentication option. In Oozie-77, client authentication uses > fall-back strategy to handle authentication, such as kerberos -> simple. User > should allow to give parameter or property to specify which authentication to > use. > > A proposal is : > > -auth simple > -auth kerberos > -auth <auth_name> > > > This addresses bug OOZIE-624. > https://issues.apache.org/jira/browse/OOZIE-624 > > > Diffs > ----- > > /trunk/client/src/main/java/org/apache/oozie/cli/OozieCLI.java 1298705 > /trunk/client/src/main/java/org/apache/oozie/client/AuthOozieClient.java > 1298705 > /trunk/client/src/main/java/org/apache/oozie/client/OozieClient.java > 1298705 > /trunk/client/src/main/java/org/apache/oozie/client/XOozieClient.java > 1298705 > /trunk/core/pom.xml 1298705 > /trunk/core/src/main/conf/oozie-site.xml 1298705 > /trunk/core/src/main/resources/oozie-default.xml 1298705 > /trunk/docs/src/site/twiki/DG_CommandLineTool.twiki 1298705 > /trunk/docs/src/site/twiki/ENG_Custom_Authentication.twiki PRE-CREATION > /trunk/docs/src/site/twiki/index.twiki 1298705 > > Diff: https://reviews.apache.org/r/3069/diff > > > Testing > ------- > > > Thanks, > > Angelo K. > >
