-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add Warning When Password Authentication is used in Mailupdates #1511
Add Warning When Password Authentication is used in Mailupdates #1511
Conversation
whois-api/src/test/java/net/ripe/db/whois/api/mail/dequeue/MessageServiceTestIntegration.java
Show resolved
Hide resolved
whois-api/src/main/java/net/ripe/db/whois/api/mail/dequeue/MessageDequeue.java
Show resolved
Hide resolved
@@ -24,6 +29,13 @@ public class MessageServiceTestIntegration extends AbstractMailMessageIntegratio | |||
@Autowired | |||
private MessageService messageService; | |||
|
|||
private static final String FORMATTED_PASSWORD_WARN = """ | |||
***Warning: Password authentication will be removed from Mailupdates in a future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use UpdateMessages.getText()
@@ -272,9 +274,19 @@ private void handleMessageInContext(final String messageId, final MimeMessage me | |||
|
|||
private void handleUpdates(final MailMessage mailMessage, final UpdateContext updateContext) { | |||
final List<Update> updates = updatesParser.parse(updateContext, mailMessage.getContentWithCredentials()); | |||
addWarnIfPasswordExists(updateContext, updates); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the story says that it should be controlled via feature flag ? If feature flag is set to false return warning and if set to true return error with default sets to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this change behind a feature flag so it can be enabled or disabled independently of Whois releases. If the flag is OFF then return a warning (make this the default). If the flag is ON then return an error.
No description provided.