Hi Mentors (Alex Earl, Kris Stern) and Community,
I am Rishikesh Varma, a student with a focus on Java Backend Development. I am highly interested in the “Jenkins Email Notifications using Outlook SMTP with OAuth” project.
Why this project: I understand that Microsoft’s deprecation of basic auth creates a critical gap for Jenkins users. I have experience with Java networking (SMTP/HTTP) and am eager to implement the OAuth 2.0 Client Credentials Flow to solve this.
Current Progress:
-
I have studied the project description and understand the need to move from PasswordAuthentication to a token-based SASL approach.
-
I have successfully forked and built the email-ext-plugin from source to validate my development environment.
-
I am currently analyzing the MailSender and SecurityComponents classes to map out the integration points.
Question: For the Client Credentials Flow, do we anticipate allowing users to configure custom OAuth scopes, or should we hardcode the standard https://graph.microsoft.com/.default scope for simplicity?
I will be drafting my proposal shortly and would appreciate any guidance.
Best regards, Rishikesh Varma
Forking and testing out the package by making the artifact
Tools used
- JDK 17
- Maven 3.9.14
- git
i will deploy the server and check proper build , i would really appreciate any Feedback provided by fellow Contributes as wells as mentors
i have done a small research about how i can mitigate the error and risk assesments
-
Libraries: I will utilize the com.microsoft.azure:msal4j library for robust OAuth 2.0 token acquisition.
-
Token Handling: To handle edge cases like expired tokens during a build, I will implement a retry mechanism. If the SMTP server returns a 401 Unauthorized error, the system will automatically refresh the token and retry the connection.
-
Testing Strategy: I will use GreenMail as a mock SMTP server. This allows for comprehensive integration testing without relying on a live Outlook account, ensuring tests are repeatable and isolated.
with i will try to reach my mentor for further assessment of the project , i would propose a proper time line
here is rough estimation for completion of the project
Project Timeline (175 Hours)
-
Weeks 1-2: Research & Setup
-
i will try to research into email-ext architecture and Microsoft Graph documentation.
-
Set up the development environment and implement a basic “Hello World” PoC for fetching an OAuth token using msal4j.
-
Weeks 3-6: Backend Implementation
-
Implement of the OAuth2Authenticator class.
-
Develop logic for token caching and refreshing.
-
Integrate the authenticator into the existing JavaMail session setup.
-
Weeks 7-9: UI & Integration
-
Update Jenkins configuration UI (Jelly) to accept Client ID, Secret, and Tenant ID.
-
Bind these UI inputs to the backend logic.
-
Weeks 10-11: Testing & Edge Cases
-
Week 12: Documentation & Final Polish
with i would like to conclude my rough timeline for completing the project sucessfully
what it share my research how i am going to implement the plugin any thought are appreciated here is my mermaid diagram