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

Comments

Projects
None yet
2 participants
@DanishMichael

DanishMichael commented Oct 21, 2015

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

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Oct 21, 2015

Member

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.

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 Oct 21, 2015

@DanishMichael

This comment has been minimized.

Show comment
Hide comment
@DanishMichael

DanishMichael Oct 21, 2015

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

DanishMichael commented Oct 21, 2015

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

@DanishMichael

This comment has been minimized.

Show comment
Hide comment
@DanishMichael

DanishMichael Oct 21, 2015

i even tried with isAnonymous but still no access is given

DanishMichael commented Oct 21, 2015

i even tried with isAnonymous but still no access is given

@sbordet

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Oct 22, 2015

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@DanishMichael

DanishMichael Oct 22, 2015

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

DanishMichael commented Oct 22, 2015

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

This comment has been minimized.

Show comment
Hide comment

@sbordet sbordet reopened this Oct 23, 2015

@DanishMichael

This comment has been minimized.

Show comment
Hide comment
@DanishMichael

DanishMichael Oct 24, 2015

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

DanishMichael commented Oct 24, 2015

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