Why are cookies unrecognized when a link is clicked from an external source (i.e. Excel, Word, etc…)

This is because MS Office is using Hlink.dll component to lookup if the link is Office document or something else. MS Office expect to open the document linked within documents without the aid of external browser (using Hlink.dll component of IE6). If session cookie protects website Hlink naturally is being redirected to login page and … Read more

Keycloak retrieve custom attributes to KeycloakPrincipal

To add custom attributes you need to do three things: Add attributes to admin console Add claim mapping Access claims The first one is explained pretty good here: https://www.keycloak.org/docs/latest/server_admin/index.html#user-attributes Add claim mapping: Open the admin console of your realm. Go to Clients and open your client This only works for Settings > Access Type confidential … Read more

CSRF Token necessary when using Stateless(= Sessionless) Authentication?

I found some information about CSRF + using no cookies for authentication: https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/ “since you are not relying on cookies, you don’t need to protect against cross site requests” http://angular-tips.com/blog/2014/05/json-web-tokens-introduction/ “If we go down the cookies way, you really need to do CSRF to avoid cross site requests. That is something we can forget when … Read more

How to get a JWT?

JWT is a token format which is used in security protocols like OAuth2 and OpenID Connect. How to get the token from the authorization server depends on the grant flow you are using. There are 4 grant flows defined in OAuth 2.0 that are intended for different clients and uses. Authorization code grant This grant … Read more

Kafka SASL zookeeper authentication

I found the issue by increasing the log level to DEBUG. Basically follow the steps below. I don’t use SSL but you will integrate it without any issue. Following are my configuration files: server.properties security.inter.broker.protocol=SASL_PLAINTEXT sasl.mechanism.inter.broker.protocol=PLAIN sasl.enabled.mechanisms=PLAIN authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer allow.everyone.if.no.acl.found=true auto.create.topics.enable=false broker.id=0 listeners=SASL_PLAINTEXT://localhost:9092 advertised.listeners=SASL_PLAINTEXT://localhost:9092 num.network.threads=3 num.io.threads=8 socket.send.buffer.bytes=102400 socket.receive.buffer.bytes=102400 socket.request.max.bytes=104857600 advertised.host.name=localhost num.partitions=1 num.recovery.threads.per.data.dir=1 log.flush.interval.messages=30000000 log.flush.interval.ms=1800000 log.retention.minutes=30 log.segment.bytes=1073741824 … Read more