Jive Software Open Source

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Openfire (ARCHIVED)
  • JM-537

Add crossdomain.xml support for Flash

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.4.3
  • Fix Version/s: 3.4.0
  • Component/s: Core
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

Flash requires a crossdomain.xml file when connecting to a foreign server. For example, let's say the flash app is served from www.example.com and the application wants to make a network connection to xmpp.example.com to do XMPP operations. That connection won't be allowed unless a crossdomain.xml file on xmpp.example.com says that it's permitted. With no intervention from the developer, Flash will attempt to find the crossdomain.xml file using an HTTP request to port 80 of xmpp.example.com in this example. However, starting with Flash 7, it's possible to make an XML socket request to find the crossdomain.xml file:

System.security.loadPolicyFile("xmlsocket://example.com:5222");
mySocket.connect("exacmple.com", 5222);

That will cause Flash to send the following request to port 5222:

<policy-file-request/>

(note, need to verify actual syntax using a Flash connection).

We should specially intercept that XML request and return crossdomain.xml contents instead of standard XMPP. It may seem a bit awkward to implement the feature this way, but it makes network settings much easier since port 5222 must already be open by the firewall. We don't want to require that users have an HTTP server on the same domain as their XMPP server, which is the motivation for this feature.

When we get a request, we should return the following:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" to-ports="5222,5223" />
</cross-domain-policy>

That allows connections from any host over ports 5222 and 5223.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Source
  • Reviews
  • Builds
Hide
Permalink
Matt Tucker added a comment - 01/24/06 05:55 PM

Note, a good resource that talks about crossdomain.xml is at:

http://www.macromedia.com/devnet/flash/articles/fplayer_security_03.html

Show
Matt Tucker added a comment - 01/24/06 05:55 PM Note, a good resource that talks about crossdomain.xml is at: http://www.macromedia.com/devnet/flash/articles/fplayer_security_03.html
Hide
Permalink
Matt Tucker added a comment - 12/21/06 10:08 AM

This feature should dovetail nicely with the HTTP Binding work and Flash.

Show
Matt Tucker added a comment - 12/21/06 10:08 AM This feature should dovetail nicely with the HTTP Binding work and Flash.
Hide
Permalink
baskar s added a comment - 03/09/07 12:19 PM

where do i have to keep the crossdomain policy file in the http server or in the xmlsocketserver if xmlsocketserver means where in the xmlsocketserver...

thanks

Show
baskar s added a comment - 03/09/07 12:19 PM where do i have to keep the crossdomain policy file in the http server or in the xmlsocketserver if xmlsocketserver means where in the xmlsocketserver... thanks
Hide
Permalink
Michael Scholz added a comment - 04/26/07 12:59 AM

soon?

Show
Michael Scholz added a comment - 04/26/07 12:59 AM soon?
Hide
Permalink
Alex Wenckus added a comment - 06/08/07 06:25 AM

Two things:
I think the policy file should be served up from a separate, configurable port rather then hacking 5222 or 5223 to serve it up.
And, it should be configurable in the admin console what domains, and also what services should flash have access to.

Show
Alex Wenckus added a comment - 06/08/07 06:25 AM Two things: I think the policy file should be served up from a separate, configurable port rather then hacking 5222 or 5223 to serve it up. And, it should be configurable in the admin console what domains, and also what services should flash have access to.
Hide
Permalink
Derek DeMoro added a comment - 09/06/07 10:50 PM

Added initial support without port configuration. Still will need to add port configuration via system properties.

Show
Derek DeMoro added a comment - 09/06/07 10:50 PM Added initial support without port configuration. Still will need to add port configuration via system properties.
Hide
Permalink
David Smith added a comment - 10/22/07 11:14 PM

crossdomain.xml is now filled in with the port number from the server; It seems to me that the secure port isn't needed, since flash doesn't currently support it, so I'm just having it fill in the non-secure one.

Show
David Smith added a comment - 10/22/07 11:14 PM crossdomain.xml is now filled in with the port number from the server; It seems to me that the secure port isn't needed, since flash doesn't currently support it, so I'm just having it fill in the non-secure one.

People

  • Assignee:
    Alex Wenckus
    Reporter:
    Matt Tucker
Vote (7)
Watch (9)

Dates

  • Created:
    01/24/06 05:52 PM
    Updated:
    03/11/08 04:27 AM
    Resolved:
    10/22/07 11:14 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for igniterealtime.org. Try JIRA - bug tracking software for your team.