[idempiere/idempiere] 6f8aef: IDEMPIERE-3101 implement OAuth2 for mail (gmail, o...

61 views
Skip to first unread message

Carlos Ruiz

unread,
Mar 6, 2021, 8:41:18 AM3/6/21
to idempi...@googlegroups.com
Branch: refs/heads/release-8.2
Home: https://github.com/idempiere/idempiere
Commit: 6f8aef6a6e798c736cb163b79cdb9d1c50df5c82
https://github.com/idempiere/idempiere/commit/6f8aef6a6e798c736cb163b79cdb9d1c50df5c82
Author: Carlos Ruiz <car...@gmail.com>
Date: 2021-03-06 (Sat, 06 Mar 2021)

Changed paths:
A migration/i8.2/oracle/202102241858_IDEMPIERE-3101.sql
A migration/i8.2/postgresql/202102241858_IDEMPIERE-3101.sql
M org.adempiere.base-feature/model.generator.launch
M org.adempiere.base-feature/packinfolder.app.launch
M org.adempiere.base-feature/sign.database.build.launch
M org.adempiere.base-feature/synchronize-terminology.app.launch
M org.adempiere.base-feature/translation.app.launch
M org.adempiere.base.process/src/org/compiere/process/EMailTest.java
M org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java
M org.adempiere.base.process/src/org/compiere/process/SendMailText.java
M org.adempiere.base/META-INF/MANIFEST.MF
A org.adempiere.base/META-INF/javamail.default.address.map
M org.adempiere.base/build.properties
M org.adempiere.base/pom.xml
A org.adempiere.base/src/org/compiere/model/I_AD_AuthorizationAccount.java
A org.adempiere.base/src/org/compiere/model/I_AD_AuthorizationCredential.java
A org.adempiere.base/src/org/compiere/model/I_AD_AuthorizationProvider.java
A org.adempiere.base/src/org/compiere/model/I_AD_AuthorizationScopeProv.java
A org.adempiere.base/src/org/compiere/model/MAuthorizationAccount.java
A org.adempiere.base/src/org/compiere/model/MAuthorizationCredential.java
A org.adempiere.base/src/org/compiere/model/MAuthorizationProvider.java
A org.adempiere.base/src/org/compiere/model/MAuthorizationScopeProv.java
M org.adempiere.base/src/org/compiere/model/MClient.java
M org.adempiere.base/src/org/compiere/model/SystemIDs.java
A org.adempiere.base/src/org/compiere/model/X_AD_AuthorizationAccount.java
A org.adempiere.base/src/org/compiere/model/X_AD_AuthorizationCredential.java
A org.adempiere.base/src/org/compiere/model/X_AD_AuthorizationProvider.java
A org.adempiere.base/src/org/compiere/model/X_AD_AuthorizationScopeProv.java
A org.adempiere.base/src/org/compiere/process/AddAuthorizationProcess.java
M org.adempiere.base/src/org/compiere/util/EMail.java
M org.adempiere.base/src/org/compiere/util/EMailAuthenticator.java
M org.adempiere.base/src/org/compiere/util/EmailSrv.java
M org.adempiere.install/install.app.launch
M org.adempiere.install/install.console.app.launch
M org.adempiere.install/install.silent.app.launch
M org.adempiere.server/WEB-INF/web.xml
A org.adempiere.server/oauth2/callback.jsp
A org.adempiere.server/src/main/servlet/org/idempiere/web/OAuthCodeCallbackHandlerServlet.java
A org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/AddAuthorizationForm.java
A org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/AddAuthorizationProcess.java

Log Message:
-----------
IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system) (#593)

* IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system)

WIP - initial version working on zk with google apps mail using OAuth2 Authorization Code Flow and Client Type = web application

* Enable imap reading with OAuth2 in RequestEMailProcessor
* Simplify the code - tested plain and OAuth2 can use the same methods
* Add +SCOPE parameter to AddAuthorizationForm according to IDEMPIERE-4713
* Rename the form AddAuthorizationMailForm to AddAuthorizationForm as is now more generic

* IDEMPIERE-4713
* Rename migration scripts to make it newer than IDEMPIERE-4713
* Add list of scopes attended by a credential
* Change form to accept other scopes, if no scope parameter is passed, then a list is shown, change the menu to fix the EMail scope
* Add MAuthorizationAccount.refreshAndGetAccessToken
* Add translation for messages

* make call generic oauth, avoid using specific google API

* Tests with microsoft as OAuth2 provider
* Add record for microsoft as provider
* Increase size of tokens
* Define mandatory and secure columns
* Update refresh token when it comes on the refresh call
* Revoke endpoint is optional

* Change the approach to a process instead of a form (WIP)
* Implement servlet to process the OAuth2 code

* Solve context suggestion from hengsin

* Implement the form in an automatic popup approach for running on zkwebui

* i18n - add translations for all messages that are shown to user
* on the form opted for click to avoid the problem with browsers forbidding popups
* clean spaces and tabs on line endings

* avoid logging and copy of the secure columns

* Fix problem reported by @d-ruiz about hidden NPE when SMTP Authentication is disabled

* Add writing to AD_PInstance_Para and AD_PInstance_Log the results of processing the servlet
* Control to avoid using the same authorization URL twice


Commit: 8f258f8cdd2416be0f6d133d7775a78e4ad97f58
https://github.com/idempiere/idempiere/commit/8f258f8cdd2416be0f6d133d7775a78e4ad97f58
Author: Carlos Ruiz <car...@gmail.com>
Date: 2021-03-06 (Sat, 06 Mar 2021)

Changed paths:
M org.adempiere.server-feature/setup/configuration/config.ini

Log Message:
-----------
IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system) (#611)

* Fixing broken setup scripts in server


Commit: ab335be6362a535af20752e29bb79922cf5573fa
https://github.com/idempiere/idempiere/commit/ab335be6362a535af20752e29bb79922cf5573fa
Author: Carlos Ruiz <car...@gmail.com>
Date: 2021-03-06 (Sat, 06 Mar 2021)

Changed paths:
M org.adempiere.base/.classpath

Log Message:
-----------
IDEMPIERE-3101 implement OAuth2 for mail (gmail, outlook and other mail system)

* .classpath modifications required for integrate with 8.2


Compare: https://github.com/idempiere/idempiere/compare/9f8b74618808...ab335be6362a
Reply all
Reply to author
Forward
0 new messages