[pve-devel] [PATCH manager 3/3] ui: support u2f authentication

Thomas Lamprecht t.lamprecht at proxmox.com
Tue May 29 12:45:26 CEST 2018


On 5/24/18 3:28 PM, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
>  www/index.html.tpl                 |   1 +
>  www/manager6/Makefile              |   1 +
>  www/manager6/Workspace.js          |   6 +-
>  www/manager6/dc/U2FEdit.js         | 145 +++++++++++++++++++++++++++++++++++++
>  www/manager6/dc/UserView.js        |  15 +++-
>  www/manager6/window/LoginWindow.js | 121 ++++++++++++++++++++++++-------
>  6 files changed, 257 insertions(+), 32 deletions(-)
>  create mode 100644 www/manager6/dc/U2FEdit.js
> 
> diff --git a/www/index.html.tpl b/www/index.html.tpl
> index a972e3aa..eca75a6f 100644
> --- a/www/index.html.tpl
> +++ b/www/index.html.tpl
> @@ -22,6 +22,7 @@
>      [%- ELSE %]
>      <script type="text/javascript" src="/pve2/ext6/ext-all.js"></script>
>      <script type="text/javascript" src="/pve2/ext6/charts.js"></script>
> +    <script type="text/javascript" src="/pve2/js/u2f-lib.js"></script>
>      [% END %]
>      <script type="text/javascript">
>      Proxmox = {
> diff --git a/www/manager6/Makefile b/www/manager6/Makefile
> index a2bd4576..e6d0e698 100644
> --- a/www/manager6/Makefile
> +++ b/www/manager6/Makefile
> @@ -180,6 +180,7 @@ JSSRC= 				                 	\
>  	dc/Guests.js					\
>  	dc/OptionView.js				\
>  	dc/StorageView.js				\
> +	dc/U2FEdit.js					\
>  	dc/UserEdit.js					\
>  	dc/UserView.js					\
>  	dc/PoolView.js					\
> diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
> index f75356c5..aed61324 100644
> --- a/www/manager6/Workspace.js
> +++ b/www/manager6/Workspace.js
> @@ -19,16 +19,12 @@ Ext.define('PVE.Workspace', {
>      updateLoginData: function(loginData) {
>  	var me = this;
>  	me.loginData = loginData;
> -	Proxmox.CSRFPreventionToken = loginData.CSRFPreventionToken;
> -	Proxmox.UserName = loginData.username;
> +	Proxmox.Utils.setAuthData(loginData);

This breaks login...
Proxmox.Utils.setAuthData does not exists, and you did not sent any
patch for our widget toolkit which adds it, AFAIS?




More information about the pve-devel mailing list