sailpoint-oss / sailpoint-cli

The SailPoint Command Line Interface (CLI) makes it easy to interact with SailPoint's SaaS Platform in a programmatic way. Many functions that use to be accomplished through tools like Postman or from custom scripts can now be done directly on the command line with minimal setup.
https://developer.sailpoint.com/discuss
MIT License
25 stars 19 forks source link

[Bug] env not switching when called #152

Closed mpotti closed 5 months ago

mpotti commented 5 months ago

I currently have 2 environments set up. One for Sandbox and one for Prod. If you need to see the non removed sensitive data logs please let me know I can email you the information.

environments configured:

PS C:\Users\REMOVED > sail environment list { "default": { "baseurl": "REMOVED", "tenanturl": "REMOVED" }, "prod": { "baseurl": "REMOVED", "tenanturl": "REMOVED" }, "sandbox": { "baseurl": "REMOVED", "tenanturl": "REMOVED" } }

Rules list debug log: even though I called sandbox it is still passing the prod configuration.

PS C:\Users\REMOVED> sail rule list -c --debug --env sandbox 2024/06/13 12:04:32 DEBU <config/config.go:199> Token Debug Info user_name=REMOVED org=REMOVED pod=REMOVED 2024/06/13 12:04:32 DEBU go-retryablehttp@v0.7.5/client.go:614 [DEBUG] POST https://REMOVED.api.identitynow.com/beta/sp-config/export 2024/06/13 12:04:34 DEBU go-retryablehttp@v0.7.5/client.go:614 [DEBUG] GET https://REMOVED.api.identitynow.com/beta/sp-config/export/REMOVED 2024/06/13 12:04:34 INFO <rule/list.go:76> Job Complete 2024/06/13 12:04:34 DEBU go-retryablehttp@v0.7.5/client.go:614 [DEBUG] GET https://REMOVED.api.identitynow.com/beta/sp-config/export/REMOVED/download

PS C:\Users\REMOVED> sail rule list -c --debug --env prod 2024/06/13 12:04:32 DEBU <config/config.go:199> Token Debug Info user_name=REMOVED org=REMOVED pod=REMOVED 2024/06/13 12:04:32 DEBU go-retryablehttp@v0.7.5/client.go:614 [DEBUG] POST https://REMOVED.api.identitynow.com/beta/sp-config/export 2024/06/13 12:04:34 DEBU go-retryablehttp@v0.7.5/client.go:614 [DEBUG] GET https://REMOVED.api.identitynow.com/beta/sp-config/export/REMOVED 2024/06/13 12:04:34 INFO <rule/list.go:76> Job Complete 2024/06/13 12:04:34 DEBU go-retryablehttp@v0.7.5/client.go:614 [DEBUG] GET https://REMOVED.api.identitynow.com/beta/sp-config/export/REMOVED/download

codey-bot[bot] commented 5 months ago

🎉 Thanks for opening your first issue here! Be sure to follow the issue template, and welcome to the community! 🙌

tyler-mairose-sp commented 5 months ago

Hey @mpotti,

Do you have any environment variables set for the CLI? It will default to those first.