Skip to content

Console access enhancements#6577

Merged
yadvr merged 19 commits into
apache:mainfrom
shapeblue:createconsoleapi
Sep 14, 2022
Merged

Console access enhancements#6577
yadvr merged 19 commits into
apache:mainfrom
shapeblue:createconsoleapi

Conversation

@nvazquez

@nvazquez nvazquez commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

Description

This PR creates a new API createConsoleEndpoint to create VM console URL allowing it to connect using other UI implementations. To avoid reply attacks, the console access is enhanced to use a one time token per session

New configuration added:

  • consoleproxy.extra.security.validation.enabled: Enable/disable extra security validation for console proxy using a token

Documentation PR: apache/cloudstack-documentation#284

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested on KVM env

Comment thread server/src/main/java/com/cloud/consoleproxy/ConsoleAccessManagerImpl.java Outdated
@nvazquez nvazquez changed the title New API: createConsoleURL [WIP] New API: createConsoleURL Jul 28, 2022
@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6577 (SL-JID-2044)

Comment thread server/src/main/java/com/cloud/consoleproxy/ConsoleAccessManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/consoleproxy/ConsoleAccessManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/consoleproxy/ConsoleAccessManagerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/consoleproxy/ConsoleAccessManagerImpl.java Outdated
@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 3979

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3981

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@codecov

codecov Bot commented Aug 15, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6577 (42e4497) into main (152a274) will increase coverage by 4.54%.
The diff coverage is 4.49%.

@@             Coverage Diff              @@
##               main    #6577      +/-   ##
============================================
+ Coverage      5.87%   10.41%   +4.54%     
- Complexity     3933     6690    +2757     
============================================
  Files          2454     2455       +1     
  Lines        242633   243131     +498     
  Branches      37970    38062      +92     
============================================
+ Hits          14246    25316   +11070     
+ Misses       226811   214649   -12162     
- Partials       1576     3166    +1590     
Impacted Files Coverage Δ
.../main/java/com/cloud/capacity/CapacityManager.java 100.00% <ø> (+100.00%) ⬆️
...ud/consoleproxy/AgentBasedConsoleProxyManager.java 0.00% <0.00%> (ø)
...ain/java/com/cloud/consoleproxy/AgentHookBase.java 0.00% <0.00%> (ø)
...va/com/cloud/consoleproxy/ConsoleProxyManager.java 0.00% <0.00%> (ø)
...om/cloud/consoleproxy/ConsoleProxyManagerImpl.java 6.88% <0.00%> (+6.88%) ⬆️
...in/java/com/cloud/server/ManagementServerImpl.java 2.47% <0.00%> (+2.47%) ⬆️
...ava/com/cloud/servlet/ConsoleProxyClientParam.java 0.00% <0.00%> (ø)
...in/java/com/cloud/servlet/ConsoleProxyServlet.java 5.29% <0.00%> (+5.29%) ⬆️
...udstack/consoleproxy/ConsoleAccessManagerImpl.java 5.09% <5.09%> (ø)
server/src/main/java/com/cloud/api/ApiServlet.java 39.28% <28.57%> (+39.28%) ⬆️
... and 487 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6577 (SL-JID-2145)

@yadvr

yadvr commented Aug 15, 2022

Copy link
Copy Markdown
Member

@nvazquez can you rebase your branch against upstream main branch?

@blueorangutan

Copy link
Copy Markdown

@borisstoyanov a Jenkins job has been kicked to build packages. It will be bundled with
SystemVM template(s). I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6577 (SL-JID-2283)

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4118

@borisstoyanov borisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yadvr

yadvr commented Sep 7, 2022

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-4837)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 37727 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6577-t4837-kvm-centos7.zip
Smoke tests completed. 102 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

Comment thread api/src/main/java/org/apache/cloudstack/consoleproxy/ConsoleAccessManager.java Outdated
Comment thread server/src/main/java/com/cloud/server/ManagementServerImpl.java Outdated
Comment thread server/src/main/java/com/cloud/servlet/ConsoleProxyClientParam.java Outdated
Comment thread server/src/main/java/com/cloud/servlet/ConsoleProxyClientParam.java Outdated
@yadvr

yadvr commented Sep 12, 2022

Copy link
Copy Markdown
Member

LGTM

@nvazquez can you review the outstanding comments and advise if this is ready for merging cc @borisstoyanov @vladimirpetrov

@nvazquez

Copy link
Copy Markdown
Contributor Author

Thanks @GutoVeronezi, have addressed your comments
@rohityadavcloud yes it is ready for merging

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6577 (SL-JID-2345)

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4175

@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

4.3% 4.3% Coverage
3.3% 3.3% Duplication

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-4887)

@yadvr

yadvr commented Sep 13, 2022

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-4888)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38042 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6577-t4888-kvm-centos7.zip
Smoke tests completed. 102 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants