Exemplo n.º 1
0
        public override void InitFilter(FilterContainer container, Configuration conf)
        {
            IDictionary <string, string> filterConfig = CreateFilterConfig(conf);

            container.AddFilter("RMAuthenticationFilter", typeof(RMAuthenticationFilter).FullName
                                , filterConfig);
        }
Exemplo n.º 2
0
        public override void InitFilter(FilterContainer container, Configuration conf)
        {
            IDictionary <string, string> @params = new Dictionary <string, string>();
            IList <string> proxies = WebAppUtils.GetProxyHostsAndPortsForAmFilter(conf);
            StringBuilder  sb      = new StringBuilder();

            foreach (string proxy in proxies)
            {
                sb.Append(proxy.Split(":")[0]).Append(AmIpFilter.ProxyHostsDelimiter);
            }
            sb.Length = sb.Length - 1;
            @params[AmIpFilter.ProxyHosts] = sb.ToString();
            string prefix    = WebAppUtils.GetHttpSchemePrefix(conf);
            string proxyBase = GetApplicationWebProxyBase();

            sb = new StringBuilder();
            foreach (string proxy_1 in proxies)
            {
                sb.Append(prefix).Append(proxy_1).Append(proxyBase).Append(AmIpFilter.ProxyHostsDelimiter
                                                                           );
            }
            sb.Length = sb.Length - 1;
            @params[AmIpFilter.ProxyUriBases] = sb.ToString();
            container.AddFilter(FilterName, FilterClass, @params);
        }
Exemplo n.º 3
0
        /// <summary>Initializes hadoop-auth AuthenticationFilter.</summary>
        /// <remarks>
        /// Initializes hadoop-auth AuthenticationFilter.
        /// <p/>
        /// Propagates to hadoop-auth AuthenticationFilter configuration all Hadoop
        /// configuration properties prefixed with "hadoop.http.authentication."
        /// </remarks>
        /// <param name="container">The filter container</param>
        /// <param name="conf">Configuration for run-time parameters</param>
        public override void InitFilter(FilterContainer container, Configuration conf)
        {
            IDictionary <string, string> filterConfig = GetFilterConfigMap(conf, Prefix);

            container.AddFilter("authentication", typeof(AuthenticationFilter).FullName, filterConfig
                                );
        }
Exemplo n.º 4
0
        public override void InitFilter(FilterContainer container, Configuration conf)
        {
            Dictionary <string, string> options = new Dictionary <string, string>();
            string username = GetUsernameFromConf(conf);

            options[CommonConfigurationKeys.HadoopHttpStaticUser] = username;
            container.AddFilter("static_user_filter", typeof(StaticUserWebFilter.StaticUserFilter
                                                             ).FullName, options);
        }
Exemplo n.º 5
0
 public override void InitFilter(FilterContainer container, Configuration conf)
 {
     container.AddFilter("DummyAuth", typeof(TestHttpCookieFlag.DummyAuthenticationFilter
                                             ).FullName, null);
 }
Exemplo n.º 6
0
 public override void InitFilter(FilterContainer container, Configuration conf)
 {
     container.AddFilter("simple", typeof(TestServletFilter.SimpleFilter).FullName, null
                         );
 }
Exemplo n.º 7
0
 public override void InitFilter(FilterContainer container, Configuration conf)
 {
     container.AddFilter("DummyFilter", typeof(TestHttpServer.DummyServletFilter).FullName
                         , null);
 }
Exemplo n.º 8
0
 public override void InitFilter(FilterContainer container, Configuration conf)
 {
     container.AddFilter("recording", typeof(TestPathFilter.RecordingFilter).FullName,
                         null);
 }