DeployHubProject / DeployHub-Pro

DeployHub Pro Pipeline Status Project
https://www.openmakesoftware.com/application-release-automation-for-continuous-delivery/
Other
11 stars 4 forks source link

environments in sub-domain not visible in Deploy task #342

Closed piyush94 closed 2 years ago

piyush94 commented 3 years ago

App: image

Assigned environments: image

Deploy choices: image

DH Version: ui-skin-v9.0.0.3173-g78c649d

piyush94 commented 3 years ago

Also, environments that are in the same sub-domain as the application show up in the choices even when not assigned to the application.

sbtaylor15 commented 3 years ago

Fixed in ui-skin-v9.0.0.3177-gb251f32

piyush94 commented 3 years ago

Two issues in the new image,

  1. Now all the environments in the sub-domain are showing up in the drop-down.
  2. Getting this error when trying to start a deployment. Timed out waiting for deployment to start Logon denied: invalid username or password Log:
    Wed Jul 14 06:03:54 2021: Calling startDeployment - waitFor is false
    Wed Jul 14 06:03:54 2021: Calling runWithTr
    ilogy
    Wed Jul 14 06:03:54 2021: Running: "dm" "-usr" "sohalpiy" "-sessionid" "C9D5E8D07108480BCE3A8085EE65B389_1626242634106" "-envid" "150" "-appid" "564" "-taskid" "101" 
    Wed Jul 14 06:03:54 2021: Running: "dm" "-usr" "sohalpiy" "-sessionid" "C9D5E8D07108480BCE3A8085EE65B389_1626242634106" "-envid" "150" "-appid" "564" "-taskid" "101" 
    Wed Jul 14 06:03:54 2021: Munching output
    Wed Jul 14 06:03:54 2021: connectToDatabase()
    Wed Jul 14 06:03:54 2021: Read m_passpharse=OMveCZtNNl7PoVNlp7OGwg==
    Wed Jul 14 06:03:54 2021: DMHOME=/opt/deployhub/engine
    Wed Jul 14 06:03:54 2021: DRIVERNAME=com.impossibl.postgres.jdbc.PGDriver
    Wed Jul 14 06:03:54 2021: CONNECTIONSTRING=jdbc:pgsql://localhost:5432/postgres
    Wed Jul 14 06:03:54 2021: USERNAME=postgres
    Wed Jul 14 06:03:54 2021: PASSWORDNAME=********
    Wed Jul 14 06:03:54 2021: CLOSED=false
    Wed Jul 14 06:03:54 2021: Login UserName=[sohalpiy] m_username=[null]
    Wed Jul 14 06:03:54 2021: sql=SELECT id FROM dm.dm_user WHERE name = ?
    Wed Jul 14 06:03:54 2021: b) sql=SELECT id FROM dm.dm_user WHERE name = ? AND status='N'
    Wed Jul 14 06:03:54 2021: datasourceid=3
    Wed Jul 14 06:03:54 2021: Trying AD fast bind sohalpiy@ap
    Wed Jul 14 06:03:54 2021: Trying basic bind uid=sohalpiy,dc=uis,dc=unisys,dc=com
    Wed Jul 14 06:03:55 2021: LDAP Login Exception caught - returning [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839]
    Wed Jul 14 06:03:55 2021: ApiException caught e=Login failed
    Wed Jul 14 06:03:55 2021: {"success":false,"error":"Login failed"}
sbtaylor15 commented 3 years ago

Tried to recreate this and no luck. Try the following:

  1. Use the Logout button on the UI. This should logout and clear all of the cached data.
  2. Login using the LDAP userid and password.
  3. Run a deployment.

Let us know if you are still getting the LDAP login exception. For some reason the credentials (userid or password) are invalid with LDAP.

sbtaylor15 commented 3 years ago

For "Now all the environments in the sub-domain are showing up in the drop-down." that should be correct. We are now displaying any environment that exists in the parent hierarchy from the application version as well as any environments in the sub-domains from the application version.

piyush94 commented 3 years ago

Tried to recreate this and no luck. Try the following:

  1. Use the Logout button on the UI. This should logout and clear all of the cached data.
  2. Login using the LDAP userid and password.
  3. Run a deployment.

Let us know if you are still getting the LDAP login exception. For some reason the credentials (userid or password) are invalid with LDAP.

Still getting this issue. Cleared all the cookies and cache in the browser. Login works fine.

I see a cookie named logindata in the RunTask request. It has my username and password in plaintext. Is this secure? Could the issue be @ symbol in my password?

sbtaylor15 commented 3 years ago

No, the username and password should not be part of the cookie as plain text. It should be a JWT token. We are looking into this.

sbtaylor15 commented 2 years ago

@piyush94 can you give this image a go? ui-skin-v9.0.0.3181-g5c4dd0a we removed the logindata cookies. Make sure to do a Logout or delete the cookies manually. We think there may have been a crisscross with the logindata and the JWT tokens. Next step will be to add in debug statements.

The @ symbol shouldn't be a problem since the password only exists as a temporary environment variable.

piyush94 commented 2 years ago

@sbtaylor15 Still getting LDAP error in the logs. The cookie looks fine. I think it's sending the incorrect password for LDAP login.

sbtaylor15 commented 2 years ago

@piyush94 we will create a debug version to see whats happening with the password.

piyush94 commented 2 years ago

@sbtaylor15 any update on this issue?

sbtaylor15 commented 2 years ago

@piyush94 when do you have time for a web meeting to look at this with the added debugging?