This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.jairsjunior.security.oauthbearer; | |
import org.apache.kafka.common.KafkaException; | |
import org.apache.kafka.common.security.auth.AuthenticateCallbackHandler; | |
import org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule; | |
import org.apache.kafka.common.security.oauthbearer.OAuthBearerTokenCallback; | |
import javax.security.auth.callback.Callback; | |
import javax.security.auth.callback.UnsupportedCallbackException; | |
import javax.security.auth.login.AppConfigurationEntry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.jairsjunior.security.oauthbearer; | |
import org.apache.kafka.common.KafkaException; | |
import org.apache.kafka.common.security.auth.AuthenticateCallbackHandler; | |
import org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule; | |
import org.apache.kafka.common.security.oauthbearer.OAuthBearerValidatorCallback; | |
import org.apache.kafka.common.security.oauthbearer.internals.unsecured.OAuthBearerValidationResult; | |
import org.apache.kafka.common.utils.Time; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KafkaServer { | |
org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required | |
LoginStringClaim_sub="admin"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################# OAuth Classes ############################# | |
listener.name.sasl_plaintext.oauthbearer.sasl.login.callback.handler.class=br.com.jairsjunior.security.oauthbearer.OauthAuthenticateLoginCallbackHandler | |
listener.name.sasl_plaintext.oauthbearer.sasl.server.callback.handler.class=br.com.jairsjunior.security.oauthbearer.OauthAuthenticateValidatorCallbackHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
#################################### KAFKA BROKER #################################### | |
kafka: | |
image: jairsjunior/kafka-with-oauth | |
ports: | |
- "9092:9092" | |
links: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
#################################### KAFKA BROKER #################################### | |
kafka: | |
image: jairsjunior/kafka-with-oauth | |
ports: | |
- "9092:9092" | |
links: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//file moodleFolder/admin/tool/uploaduser/index.php | |
//line ~ 843 | |
//Comment the first line of if and add this another 3 lines to when | |
//bulk create user without password generate pass and send e-mail. | |
if ($user->password === 'to be generated') { | |
// set_user_preference('create_password', 1, $user); | |
setnew_password_and_mail($user); | |
unset_user_preference('create_password', $user); | |
set_user_preference('auth_forcepasswordchange', 1, $user); |