Proxy plugin misbehaves on certain ppath

I have the following definitions in obj.conf of iplanet 4.1 SP11 under solaris
5.7.
<Object name="spotbid" ppath="*/spotbid/*">
Service fn="wl_proxy" WebLogicHost="###.###.###.####" WebLogicPort="7012" DebugConf
igInfo="ON"
</Object>
<Object name="old" ppath="*">
Service fn="wl_proxy" WebLogicHost="###.###.###.####" WebLogicPort="8009" DebugConf
igInfo="ON"
</Object>
The problem:
Every single request goes to the spotbid even if the request does not go to start
with /spotbid. For example: http://host/foo will go to port 7012, instead of 8009.
If I change from ppath="*/spotbid/*" to ppath="*/nothing/*"
it works as excepted.
"spotbid" is the user iplanet runs under. It is also the first directory in the
path to iplanet "/spotbid/.../iplanet4/https-proxy"
I have tried this with the proxy plugins from weblogic 5.1 and 6.1 and both exhibit
the same problem.

I tried myself with playing proxy settings of browser along with above configuration.Finally I got it.

Similar Messages

  • Reverse proxy plugin with SSL

    Hi,
    I'm trying to set up reverse proxy plugin that forwards requests from plain HTTP port on web server to SSL port on origin-server (sun web console)
    I have followed instructions from [http://blogs.sun.com/meena/entry/configuring_reverse_proxy_in_web] to achieve this:
    wadm create-reverse-proxy --user=admin --password-file=/.ws7pass --config=test --vs=test --uri-prefix=/console/ --server=https://webconsole:6789And part of my obj.conf related to reverse-proxy:
    NameTrans fn="map" from="/console/" to="https:/" name="reverse-proxy-/console"
    <Object ppath="https:*">
        Service fn="proxy-retrieve" method="*"
    </Object>
    <Object name="reverse-proxy-/console">
        Route fn="set-origin-server" server="https://webconsole:6789/"
    </Object>When one tries to access http://test/console/ following messages appear in the log file:
    fine    (27868): for host x.x.x.x trying to GET https:/, service-http reports: attempting to contact webconsole:6789
    fine    (27868): for host x.x.x.x trying to GET https:/, attempting to resolve webconsole
    fine    (27868): for host x.x.x.x trying to GET https:/, attempting to connect to 192.168.1.80:6789
    fine    (27868): for host x.x.x.x trying to GET https:/, connected to 192.168.1.80:6789
    failure (27868): for host x.x.x.x trying to GET https:/, service-http reports: HTTP7765: error reading response header (Server closed connection)
    finest  (27868): for host x.x.x.x trying to GET https:/, func_exec reports: executing fn="set-origin-server" server="https://webconsole:6789/" Directive="Route" magnus-internal=""
    fine    (27868): for host x.x.x.x trying to GET https:/, set-origin-server reports: using server https://webconsole:6789
    finest  (27868): for host x.x.x.x trying to GET https:/, func_exec reports: fn="set-origin-server" server="https://webconsole:6789/" Directive="Route" magnus-internal="" returned 0 (REQ_PROCEED)
    finest  (27868): for host x.x.x.x trying to GET https:/, func_exec reports: fn="proxy-retrieve" method="*" Directive="Service" returned -1 (REQ_ABORTED)Any ideas?

    Oh, sorry, when I'm accessing console through reverse proxy, nothing is written to the web console log initially, and these messages appear in the web server log (now loglevel=info):
    [15/May/2008:15:52:41] failure (23204): for host x.x.x.x trying to GET https:/, service-http reports: HTTP7765: error reading response header (Server closed connection)
    [15/May/2008:15:52:41] info    (23204): for host x.x.x.x trying to GET https:/, set-origin-server reports: HTTP7751: server https://webconsole:6789 offline
    [15/May/2008:15:52:41] failure (23204): for host x.x.x.x trying to GET https:/, service-http reports: HTTP7765: error reading response header (Server closed connection)
    [15/May/2008:15:52:41] failure (23204): for host x.x.x.x trying to GET https:/, service-http reports: HTTP7765: error reading response header (Server closed connection)After some time this message is written to webserver log:
    [15/May/2008:15:53:02] info (23204): trying to OPTIONS https://webconsole:6789, check-http-server reports: HTTP7750: server https://webconsole:6789 onlineAnd simultaneously this message is written to webconsole log:
    CoreSessionManagerFilter:doFilter | Request: https-mfwk-zone-6789: /

  • WebLogic proxy plugin: getPooledConn: No more connections in the pool

    Hi,
    We have weblogic proxy plugin installed in Sun One web server. but frequently we are getting following errors in proxy log:
    <1670612410085901> attempt #0 out of a max of 5
    <1670612410085901> Trying a pooled connection for '<IP>/<port>/<port>'
    <1670612410085901> getPooledConn: No more connections in the pool for Host [<IP>] Port[<port>] SecurePort[<port>]
    Can anybody please tell how this proxy plugin manages connection pools? I don't find any minimum / maximum number of conection to mention anywhere or how exactly it works?

    Try increasing the "AcceptBackLog" settings on the weblogic server and then verify for any changed behavior.
    Raise the Accept Backlog value from the default by 25 percent. Continue increasing the value by 25 percent until the messages cease to appear.
    Link :[http://e-docs.bea.com/wls/docs81/perform/WLSTuning.html#1136287]

  • IP address lost in Weblogic proxy plugin

              Hi,
              We have 4 web servers that forward requests for jsps to 10 weblogic instances
              working in a cluster. The web servers have IPlanet with weblogic proxy plugin.
              One of the jsps has logic to retrieve the client's IP address and then return
              the name of the country to which the IP address belongs. But since the jsp always
              receives requests from one of the 4 web servers on the same LAN, it gets only
              the internal IP address of the web server and returns no country code. To retrieve
              the IP address of the caller in the jsp, I'm using
              ipAddress = request.getRemoteAddr();
              How can I make my jsp know the actual source IP address of the client (i.e the
              end user)?
              Any help would be appreciated.
              Dipak Jha
              

    Try increasing the "AcceptBackLog" settings on the weblogic server and then verify for any changed behavior.
    Raise the Accept Backlog value from the default by 25 percent. Continue increasing the value by 25 percent until the messages cease to appear.
    Link :[http://e-docs.bea.com/wls/docs81/perform/WLSTuning.html#1136287]

  • Weblogic proxy plugin closes keep-alive connections to clients randomly

    In short we have following arhitecture:
    clients ---> wl proxy plugin 1 ----> weblogic 1
    clients ---> wl proxy plugin 2 ----> weblogic 2
    Beacuse of the application/installation specific requirements, we are not using failover, one wl proxy always forwards requests to one weblogic (simple configuration).
    Application is TR-069 protocol based (SOAP over HTTP) so it very much relays on persistence TCP connections (Connection: keep-alive). This TCP persistence has to work correctly in order that TR-069 messages are exchanged in required order, otherwise we have a error on application layer.
    Here and there we've noticed applications errors which suggest that we have some problems in TCP connection between the client and the weblogic server. After sniffing, we've noticed that weblogic proxy plugin (Apache) randomly, or because of some other reason we do not know, decides to close TCP connection to client, even app on weblogic did not request so ???
    As a result, client opens new connection to the server with new TR-069 session and it gets bounced beacuse it allready has one open on weblogic server.
    We've sniffed, traced everything we could, we were searching for patterns in time, etc... but we can not find the reason why proxy plugin decides to close the connection to the client (not to the weblogic server).
    Trace (replaced sensitive information):
    Thu Apr 29 15:05:50 2010 <958012725463463784> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 200 OK]
    Thu Apr 29 15:05:50 2010 <958012725463463784> URL::parseHeaders: StatusLine set to [200 OK]
    Thu Apr 29 15:05:50 2010 <958012725463463784> parsed all headers OK
    Thu Apr 29 15:05:50 2010 <958012725463463784> sendResponse() : r->status = '200'
    Thu Apr 29 15:05:50 2010 <958012725463463784> canRecycle: conn=1 status=200 isKA=1 clen=545 isCTE=0
    Thu Apr 29 15:05:50 2010 <958012725463463784> closeConn: pooling for '$IP$/$PORT$'
    Thu Apr 29 15:05:50 2010 <958012725463463784> request [$URL$] processed successfully..................
    !!!! Now it closes the TCP connection and inserts "Connection: close" HTTP header !!!
    WL proxy plugin conf params are:
    WebLogicCluster $IP$:$PORT$
    DynamicServerList OFF
    KeepAliveTimeout 90
    MaxKeepAliveRequests 0
    KeepAliveSecs 55
    Apache worker configuration is:
    <IfModule mpm_worker_module>
    PidFile var/run/httpd-worker.pid
    LockFile var/run/accept-worker.lock
    StartServers 2
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadLimit 200
    ThreadsPerChild 200
    MaxClients 2000
    MaxRequestsPerChild 0
    AcceptMutex pthread
    </IfModule>
    Why weblogic proxy plugin ignores Keep-alive directive and decides to close connection to the client by itself?
    Any help?

    If a WebLogic Server instance listed in either the WebLogicCluster parameter or a dynamic cluster list returned from WebLogic Server fails, the failed server is marked as "bad" and the plug-in attempts to connect to the next server in the list.
    MaxSkipTime sets the amount of time after which the plug-in will retry the server marked as "bad." The plug-in attempts to connect to a new server in the list each time a unique request is received (that is, a request without a cookie).
    Note: The MaxSkips parameter has been deprecated as the MaxSkipTime parameter.
    See also here: http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs81/plugins/plugin_params.html
    You said the problem arises under significant load. Maybe, it is wise to tune the number file descriptor's on your operating system. HTTP connections are nothing more than TCP sockets on the operating system. All modern operating systems treat sockets as a specialized form of file access and use data structures called file descriptors to track open sockets and files for an operating system process. To control resource usage for processes on the machine, the operating system restricts the number of open file descriptors per process. You should be aware that all TCP connections that have been gracefully closed by an application will go into what is known as the TIME_WAIT state before being discarded by the operating system.
    On most unix systems you can use netstat -a | grep TIME_WAIT | wc -l to detemine the number of socket in time_wait state. You have to check with your system adminstrator how to tune the tcp_time_wait_interval. On solaris you can use: /usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 60000

  • Oracle Proxy Plugin - IIS - Certificates

    I have a setup where IIS fronts for Oracle Application Server using the Oracle Proxy Plugin. I understand this is fairly routine, however; I have run into a situation where I need Client Certificate information pushed back to a single application on the Oracle Server. According to documentation, the plugin does not backend requests SSL even in an SSL environment. This effectively blocks certificate information from anything sitting behind the plugin. Has anyone found or created a clean workaround/alternative solution to this problem? Unfortunately, IIS has to remain in front and Oracle has to remain behind.

    All,
    Solved it myself and it works with OC4J only.
    Regards,
    MB

  • Load balancing by the proxy plugin

    Has anyone encountered this before:
    I have a cluster of two WLS 5.1 servers, hosting servlets that serve web
    requests. The requests are proxied through a web server ( I have tried
    Weblogic, Apache as well as IIS). I also have a tool that simulates
    concurrent web requests and fires them to the proxy server.
    As per documentation, as the load balancing while proxying requests to
    servlets is round robin, I expect that the requests are uniformly
    distributed across the two weblogic servers. But what I see is a bit
    different. In one case I fired 15 requests and found that 11 went to first
    server and 4 went to the other.
    Second time when I fired again 2 of them went to the first server and 13 to
    the second one. I would expect that around half of the total requests
    should be routed to each server everytime so that there is a proper load
    balancing done by the proxy. I have not changed any configuration related
    to the default load balancing algorithm. So I expect it is round-robin.
    Has anyone encountered this before ? This happens to me irrespective of
    which proxy server I use (i.e which proxy plugin I use). Is there some
    other configuration required and I am missing something or is there some
    inherent problem with the load balancing of the proxy plugins. Any info
    would be highly appreciated.
    Thanks
    Mainak

    Could you post this in weblogic.developer.interest.plug-in? This group is for
    ejb related questions. Thanks.
    Bill
    Mainak Datta wrote:
    Has anyone encountered this before:
    I have a cluster of two WLS 5.1 servers, hosting servlets that serve web
    requests. The requests are proxied through a web server ( I have tried
    Weblogic, Apache as well as IIS). I also have a tool that simulates
    concurrent web requests and fires them to the proxy server.
    As per documentation, as the load balancing while proxying requests to
    servlets is round robin, I expect that the requests are uniformly
    distributed across the two weblogic servers. But what I see is a bit
    different. In one case I fired 15 requests and found that 11 went to first
    server and 4 went to the other.
    Second time when I fired again 2 of them went to the first server and 13 to
    the second one. I would expect that around half of the total requests
    should be routed to each server everytime so that there is a proper load
    balancing done by the proxy. I have not changed any configuration related
    to the default load balancing algorithm. So I expect it is round-robin.
    Has anyone encountered this before ? This happens to me irrespective of
    which proxy server I use (i.e which proxy plugin I use). Is there some
    other configuration required and I am missing something or is there some
    inherent problem with the load balancing of the proxy plugins. Any info
    would be highly appreciated.
    Thanks
    Mainak

  • BEA 10.2 proxy plugin

    Dear all,
    i don't know that i am a correct place, but i have a question about a bea weblogic proxy plugin.
    The situation is, that we have a BEA 10.2 32 bit application server in use, and want to use 64 bit iPlanet webserver. I have an error message when i try to start the 64 bit webserver with a 32bit proxy plugin, and think that i must use an 64Bit wl-proxy plugin. But i think so to, that the question is that would this work correctly?
    thanks for any help (link to a correct forum - maybe iplanet webserver?)
    regards,
    Ferenc Junkert

    This one has given me the run around for several days now. I
    had exactly the same condition. The fix, in my case, was as
    follows.
    Uninstall Shockwave Player. I used the 'sw_uninstaller.exe'
    file from the Adobe website as I had already downloaded it, but it
    should do just as well to run C:\
    Windows\System32\Macromed\Shockwave10\UNWISE.EXE or 'Adobe
    Shockwave Player' in 'Add/Remove Programs'.
    Once Shockwave Player is uninstalled run the latest Mozilla
    Firefox installation file over the top of the existing program even
    if you are running the latest version. Currently this is 'Firefox
    Setup 2.0.0.9.exe'.
    Once that is done I found that the Shockwave plugin installed
    correctly. It appears, if you need to reinstall Firefox for any
    reason, you also need to uninstall Shockwave (and probably Flash
    Player too) before the Adobe plugin(s) are reinstalled.

  • The important parameters controlling behaviour of the Proxy Plugin

    The 7.0 Proxy Plugin has various crucial parameter controlling its operation. These are n:
    #1. poll-timeout parameter that determines how long it waits for a reply before
    considering a request as having failed.
    The poll-timeout can be increased by adding the poll-timeout parameter to the end of
    the Service entry within the obj.conf file. For example:
    Service type="magnus-internal/passthrough" fn="service-passthrough"
    servers="http://sunflash.red.iplanet.com" poll-timeout="600000"
    Default timeout is 5 minutes, or 300000 milliseconds
    Maximum timeout is 6 hours, or 21600000 milliseconds
    Minimum timeout is 1 second, or 1000 milliseconds
    #2. connect-timeout parameter that determines how long to wait for a connection
    Minimum = 10 ms
    Maximum = 75 seconds (75 * 1000)
    Default = 5 seconds (5 * 1000)
    #3. connect-interval parameter that determines Interval between connect() calls
    Minimum = 10 ms
    Maximum = 30 seconds (30 * 1000)
    Default = 500 ms
    AND
    #4. keep-alive-timeout parameter that determines Maximum time to let connections idle
    Minimum = 0
    Maximum = 6 hours (6 * 60 * 60 * 1000)
    Default = 30 seconds (30 * 1000)

    JoachimSauer wrote:
    I wouldn't care about efficiency in this kind of methods. Only optimize,
    when you find out that this method is indeed a bottleneck, otherwise just
    write a simple implementation (simple implementations are usually easier
    to optimize for the JIT compiler, than "clever" impelementations).I agree with you, and when you recommend to basically "write dumb code", this interview with Brian Goetz crosses my mind: http://java.sun.com/developer/technicalArticles/Interviews/goetz_qa.html
    But given that the prolem at hand is Boolean, why not make a simple straightforward approach:
    !((a & b) | (a & c) | (a & d) | (b & c) | (b & d) | (c & d)), which leads to
    !((a & (b | c | d)) | (b & (c | d)) | (c & d)) or
    boolean xor(final boolean a, final boolean b, final boolean c, final boolean d) {
      return !((a & (b | c | d)) || (b & (c | d)) || (c & d));
    }I consider this an acceptable solution, too.
    EDIT:
    No, not anymore! It may look nice and all, but is not quite XOR... so I apologize for being careless and not double-checking what I wrote (my "xor" returns true even if all arguments are false) -- sorry!
    This should (hopefully) be correct:
    EDIT2:
    <del>[...]</del>
    Aarrgh, but it's still horribly wrong! Made the same mistake twice, now I'll take some time to really think before totally embarrassing myself today...
    But I have to admit that JoachimSauer's solution is indeed simpler and is probably the right choice...
    Message was edited (2x) by:
    oebert: correction
    Message was edited by:
    oebert

  • Help creating Proxy Plugin for an Ad SWC

    I'm trying to create a plugin for an ad component, where ad video playback is all handled in a SWC.
    I took the OSMSPlayer example, and modifed the constructor to load my plugin using the players factory object, and once loaded, I continue with the player setup and configuration.  There doesn't seem to be a problem here, everything loads fine.
    I then proceeded to create a proxy plugin.
    Within ProxyElement, when set proxyElement is called, I create a SerialElement, and add the passed mediaElement as the first child of the SerialElement.
    I then add a loadTrait to the proxyElement, and listen for the LoadEvent.LOAD_STATE_CHANGE event.  When this is fired, I insert a MediaElement (preroll), which has a PlayTrait, DisplayTrait, TimeTrait and AudioTrait, as the first child of the proxied serialElement, and call play.  The preroll video plays fine, i hear audio and see the time updates in the player, but the video is not visible.  If I then pause the video, it suddenly appears, and is visible for the remainder of the clip.  Once the preroll is complete, the orginal mediaElement plays fine.
    I followed the MASTPlugin example, as I am trying to do something similar, except my video playback is handled via a SWC (added to the DisplayTrait).  If I just insert a plain VideoElement as the preroll and load a flv it plays fine, so its something specific to my MediaElement impl, but I can't figure out why it doesn't display until I hit pause.
    Any help would be greatly appreciated, I've already burned hours trying to figure this out.
    Also, looking at the use case chart below, I probably actually need to create a reference plugin.  Does anyone have an example of a reference plugin?
    http://help.adobe.com/en_US/OSMF/1.0/Dev/WSc6f922f643dd2e6d-12f30d7b1262b59cb0d- 7ffe.html

    The behavior you're describing sounds like a bug -- if you can post a small, self-contained example that reproduces the problem, that would be
    very helpful.
    You might also want to look at DurationElement and SWFElement.  When you wrap the latter in the former, you can display a SWF but augment it with the ability to play, pause, have a duration, and seek.  The ExamplePlayer sample app has at least one example showing how to use this (I think it's called "Timed Image" and uses ImageElement rather than SWFElement, but the approach is the same).
    As for reference plugins, the ControlBarPluginSample (+ ControlBarPlugin) is a good example of a reference plugin.  This sample shows how you can load and display the player chrome dynamically from a plugin.

  • Proxy plugin - Debug parameter values

    Up until a few months ago the proxy plugin documentation for WLS 8.1 included multiple values that the Debug parameter could be set to (e.g ALL to see just about everything, ones to see just headers etc). Now it only seems to have True|False. http://e-docs.bea.com/wls/docs81/plugins/plugin_params.html#1154491
    Is there a reason this was changed? The old way was much more flexibile.
    Has this been changed for the latest SP?
    I am holding out some hope that maybe the documentation is incorrect.... Debug=ALL still works for 8.1 sp4

    all the options seem to be there and working.
    we are using DEBUG=ERR, since ALL crashes linux when the log grows to 2GB!

  • Iplanet proxy plugin issue; simple but iam confused; Please Help !!

    Hi All,
    Iam using Iplanet proxy plug-in with BEA weblogic6.1. In simple terms. the iplanet webserver proxies any dynamic requests to the application tier(wls6.1)
    And we have configured the proxy plug-in to show the debugging information on to __WebLogicBridgeConfig page.
    Now, could somebody explain more about the "requests:" and "successful requests:" that is been shown on the iplanet proxy plugin's __WebLogicBridgeConfig ???
    I mean i understand that "requests:" are the Total # of request that proxy plugin received. And "successful requests:" are the # of requests that went pass through to the wls server. But what happen to the requests which are UN successful requests .....i have seen the fugures like this:
    "requests:2000" "successful requests:1900"
    then what happened to these 2000-1900=100 requests.....why is there difference and why does this happen???
    how can calculate these UNsuccessful requests in my iplanet proxy logs ???
    please advise. I would really really appreciate your help on this.
    -san

    In more simple terms and to eloborate more on what iam asking, how can an HTTP request become unsuccessful ?
    Again, more specifically, is __WebLogicBridgeConfig shows information of unsuccessful for the application tier OR any unsuccessful requests for the web tier ?
    -sangita

  • Wls 7.0 sp2 proxy plugin issue with iplanet6.x and wls 6.1 sp3 app server

    Hi,
    I've a setup with iplanet 6.x webserver using the wls 7.0 sp2 proxy plugin to
    route requests to the clustered app server instances (2 of them) that are in wls
    6.1 sp3.
    The issue is, I'm noticing that the session is not sticky and is getting routed
    onto the other app server instance. The error that I see in the wlproxy.log is
    as follows:
    *******Exception type [PROTOCOL_ERROR] raised
    at line 654 of URL.cpp
    Thu Nov 13 11:30:08 2003 failure on sendRequest() w/ recycled connection
    to Instance1:7001, numfailures=1
    Thu Nov 13 11:30:08 2003 Marking Instance1:7001 as bad
    Thu Nov 13 11:30:08 2003 got exception in sendRequest phase:
    PROTOCOL_ERROR [line 654 of URL.cpp]: unexpected EOF
    reading HTTP status at line 1010
    Thu Nov 13 11:30:08 2003 Failing over after sendRequest exception
    Thu Nov 13 11:30:08 2003 attempt #1 out of a max of 5
    Has anyone seen this issue? Can anyone explain why this issue is occuring.?
    Thanks.

    Did you find a solution for this problem?
    I have somthing very similar going on where I am currently working.
    Thanks!
    Andy.
    "Simple Guy" <[email protected]> wrote:
    >
    Hi,
    I've a setup with iplanet 6.x webserver using the wls 7.0 sp2 proxy plugin
    to
    route requests to the clustered app server instances (2 of them) that
    are in wls
    6.1 sp3.
    The issue is, I'm noticing that the session is not sticky and is getting
    routed
    onto the other app server instance. The error that I see in the wlproxy.log
    is
    as follows:
    *******Exception type [PROTOCOL_ERROR] raised
    at line 654 of URL.cpp
    Thu Nov 13 11:30:08 2003 failure on sendRequest() w/ recycled connection
    to Instance1:7001, numfailures=1
    Thu Nov 13 11:30:08 2003 Marking Instance1:7001 as bad
    Thu Nov 13 11:30:08 2003 got exception in sendRequest phase:
    PROTOCOL_ERROR [line 654 of URL.cpp]: unexpected EOF
    reading HTTP status at line 1010
    Thu Nov 13 11:30:08 2003 Failing over after sendRequest exception
    Thu Nov 13 11:30:08 2003 attempt #1 out of a max of 5
    Has anyone seen this issue? Can anyone explain why this issue is occuring.?
    Thanks.

  • Proxy Plugin Layering

    Hello,
    I currently have this issue with display object layering and I was hoping someone could help. Basically, I have a video sprite that contains the OSMF player and a play/pause overlay on top of that. Inside the video sprite, a proxy plugin is loaded. This plugin places a button on top of the player. Since this plugin is in the same container as the OSMF player, it sits directly on top of it. My problem is that I need it to be on top of the overlay. Is there an easy solution to get around this?
    Thanks!

    should be no problem at all... the plugin talks to the application server
              

  • Proxy Plugin

    Hello,
    I'd like to know if, in a proxy plugin, we have access to the MediaContainer which is containing the proxied media element ?
    Thanks
    Best regards

    Hi,
    Here is a player side snippet (it might contain spelling errors, i didn't check it with a compiler).
    var pluginResource = new URLResource("http://myserver.com/myplugin.swf");
    pluginResource.addMetadataValue("username", "myusername");
    pluginResource.addMetadataValue("password", "mypassword");
    var mediaFactory:MediaFactory = new DefaultMediaFactory();
    mediaFactory.... add events listeners
    mediaFactory.loadPlugin(pluginResource);
    Here is a snippet in a PluginInfo side:
    * SingleSignOnPluginInfo will read the username and password from the plugin metadata
    * and will create a SingleSignOnProxyElement that would handle the auth.
    public class SingleSignOnPluginInfo extends PluginInfo
    public const SSO_USERNAME:String = "username";
    public const SSO_PASSWORD:String = "password";
    public function SingleSignOnPluginInfo()
    var items:Vector.<MediaFactoryItem> = new Vector.<MediaFactoryItem>();
    var item:MediaFactoryItem = new MediaFactoryItem("org.osmf.plugin.singlesignon",
    canHandleResource,
    createMediaElement,
    MediaFactoryItemType.PROXY);
    items.push(item);
    super(items);
    override public function initializePlugin(resource:MediaResourceBase):void
    username = resource.getMetadataValue(SSO_USERNAME) as String;
    password =  resource.getMetadataValue(SSO_PASSWORD) as String;
    // Internals
    private var username:String;
    private var password:String;
    * Handles everything
    private function canHandleResource(resource:MediaResourceBase):Boolean
         return username != null && password != null;
    * Creates a new MediaElement and sets on it the plugin metadata
    private function createMediaElement():MediaElement
    var mediaElement:MediaElement = new SingleSignOnProxyElement(null, username, password);
    return mediaElement;

Maybe you are looking for