Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Security blocking cometd access #610

Open
DanishMichael opened this issue Oct 21, 2015 · 7 comments
Open

Spring Security blocking cometd access #610

DanishMichael opened this issue Oct 21, 2015 · 7 comments

Comments

@DanishMichael
Copy link

i was just playing around with cometd in a Spring MVC project.
This is how I am calling the server for handshake

var cometd = $.cometd;
var COMETD_URL = "http://myURL";
cometd.configure({
    url: COMETD_URL,
    logLevel: 'debug'
});
cometd.init(function(handshakeReply)
        {
            if (handshakeReply.successful)
            {
                alert("success");
                // Successfully connected to the server.
                // Now it is possible to subscribe or send messages
            }
            else
            {
                alert("failure");
                // Cannot handshake with the server, alert user.
            }
        });

Looking in the logs of Firebug, I can see 403 forbidden error and the html message I used in spring security for access prevention.

Can you please fix this or help me out

@sbordet
Copy link
Member

sbordet commented Oct 21, 2015

I don't understand. If you have setup Spring security, and it prevents access to CometD, just modify your Spring security configuration to allow CometD access.

Or, attach to this issue a fully reproducible project that shows your Spring configuration that we can use to reproduce and possibly resolve your issue.

@sbordet sbordet closed this as completed Oct 21, 2015
@DanishMichael
Copy link
Author

i tried to do this
security:intercept-url pattern="/comet/**" access="permitAll"
but it still denies access

@DanishMichael
Copy link
Author

i even tried with isAnonymous but still no access is given

@sbordet
Copy link
Member

sbordet commented Oct 22, 2015

Sorry, I would love to help you, but I really cannot without a reproducible project with complete configuration files.

@DanishMichael
Copy link
Author

Hi, I can provide you with some files/resources but unfortunately not all

I hope you can find what to do with these files

On Thu, Oct 22, 2015 at 1:39 PM, Simone Bordet notifications@github.com
wrote:

Sorry, I would love to help you, but I really cannot without a
reproducible project with complete configuration files.


Reply to this email directly or view it on GitHub
#610 (comment).

Danish Michael

@sbordet
Copy link
Member

sbordet commented Oct 23, 2015

@DanishMichael
Copy link
Author

Hi,

That post on stackoverflow is by me as well.

On Fri, Oct 23, 2015 at 6:31 PM, Simone Bordet notifications@github.com
wrote:

See
http://stackoverflow.com/questions/33292490/cometd-not-working-with-spring-security


Reply to this email directly or view it on GitHub
#610 (comment).

Danish Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants