Harness Platform FAQs
Subscriptions
For Developer 360 subscriptions, how do we remove users who left the company?
Delete the user(s) from the platform. The user will be removed from the Developer license count immediately.
This applies to Developer oriented modules: Continuous Integration (CI), Code Repository (CR), Feature Flags (FF), and Internal Developer Portal (IDP). For more information, go to View and manage subscriptions.
Access Control/RBAC
What is RBAC and how do I manage users and roles?
Harness NextGen platform utilizes Role-Based Access Control (RBAC). For more information, go to this blog post and RBAC in Harness in the documentation.
Are there any built-in roles I can use?
Yes, for more information on built-in roles, go to RBAC in Harness.
What is the best way to implement Harness RBAC?
Following a workflow can be a useful process for implementing and understanding RBAC:
To configure RBAC in Harness, you must:
- Create roles.
- Create resource groups and, optionally, apply RBAC.
- Create user groups, create service accounts, and add users.
- Assign roles and resource groups to users, user groups, and service accounts.
- If you have not already done so, configure authentication.
What are the main components of RBAC?
RBAC uses Principals, Resource Groups, and Roles to control access.
- Principals are entities taking action in the system. These include users, user groups, and service accounts.
- Resource Groups define what objects can be acted on. Objects include organizations, projects, pipelines, connectors, users, and more.
- Roles define what actions can be taken on objects. Actions include view, create, edit, delete, and so on.
Are there any features in Harness that I can prevent a pipeline from re-running via RBAC?
Rerun shares the same RBAC as RUN features. Therefore, users who can run the pipeline can also re-run, as there is no separate RBAC for Rerun.
Does Harness NextGen Free edition support RBAC?
Yes, Harness NextGen Free edition supports RBAC. For a feature comparison and supported functionality, go to the pricing page on Harness.io
.
What is a Resource Group?
Resource groups are an RBAC component that defines the objects that a user or service account can access. Objects are any Harness resource, including projects, pipelines, connectors, secrets, delegates, environments, users, and more.
For more information, go to Add resource groups.
Does Harness support provisioning users and user groups via GitHub?
No. Harness currently supports the following provisioning methods:
- Okta SCIM
- Microsoft Entra ID SCIM
- OneLogin SCIM
- Just-in-time provisioning
I'm a user of multiple accounts. Why am I getting an error when I try to redirect to a specific account?
Use the direct URL with the accountId
for the desired account, such as https://app.harness.io/ng/account/:accountId/settings/overview
.
You can then sign in and change your default account from your profile.
Currently, Azure only supports view access at the project level. However, documentation suggests that view access is only available at the account level. How can we achieve project-level view access using Azure AD?
The access depends on how and where you have added the user. If the user is added at the account level manually or via SCIM, they are automatically part of the All Account Users group, inheriting permissions associated with that group.
However, if the user is only added at the project level, they are added to the All Project Users group, and permissions associated with that user group apply.
Additionally, you can add a user at the account level and manage project-level permissions through Access Control at the project level. The same principle applies to organization-level access.
What is Role Binding, and how does it relate to Harness RBAC?
Role binding refers to the process of assigning roles and resource groups to principals (users, user groups, and service accounts). Role binding can be configured at all scopes.
Is there an overview doc on Harness RBAC and permissions?
Yes, for more information, go to Permissions reference.
Can I configure RBAC for the environment based on the stage?
No, you can only configure RBAC for the environment based on environment type.
Does Harness log GET Calls in the audit logs?
No, Harness doesn't support audit trails for read API requests like GET.
Why are RBAC checks different for pipelines stored inline vs. Git?
You can set Harness to by default, before running any pipeline, check whether the user has access to all of the environments and other resources that the pipeline accesses. This check is run only for inline pipelines, not those stored in Git or other repositories.
Currently, this feature is behind the feature flags CDS_PIPELINE_ABORT_RBAC_PERMISSION_MIGRATION
and CDS_PIPELINE_ABORT_RBAC_PERMISSION
. Contact Harness Support to enable the feature.
Turn off this setting if the check isn't required. Turning this off can cause pipelines to fail partway through execution (since later stages could have permission issues that haven't been checked beforehand).
For more information, go to Run RBAC Validation before executing Inline Pipelines.
What is the purpose of linkedSsoDisplayName?
LinkedSsoDisplayName
is the same SSO setting name in Harness. For SAML, the value provided for both ssoGroupId
and ssoGroupName
must be the same.
Will creating an administrator role at the account level and assigning it to a resource group with specific scope for a Harness organization grant admin access only to that organization?
To achieve your use case, it is recommended that you create a user with limited access at the account level. Then, add the same user to the organization level where you require admin access. This way, you can have control over user RBAC at the organization level scope.
How can I view the de-factor roles/permissions assigned to a user?
You can view all permissions for a user by going to Access Control. Search for and then select the user. Select Role Bindings to view permissions for the user at all scopes.
If you want to review permissions within a role like Account Viewer or any custom-created role, as well as within a Resource Group, you must select each role or resource group individually, as they are not displayed on the User Permissions page.
Harness solely displays permissions at the Account/Project/Organization level along with the assigned role and resource group, whether assigned through a user group or directly. However, you can view all permissions together by selecting the scope as All instead of Individual.
How do we provision users with pre-defined or custom roles?
With Harness, users and groups can be created automatically via SCIM. Permissions in Harness are granted via roles. You can use built-in roles or create your own at every Harness scope (account, organization, and project). You can assign roles to groups, and assigning roles to groups gives all the users in the group the permissions spelled out in the role. For more information, go to Role-Based Access Control (RBAC) in Harness.
Can an admin user assume the same role as an alternate user for testing permission issues?
No, there is no such option currently. To debug permission related issues, check the groups and roles assigned to user.
API/Integration
How can you update a secret file using binary file content through an API request?
To update a secret file using binary file content, you can use the following cURL command:
curl -X PUT 'https://app.harness.io/gateway/ng/api/v2/secrets/files/filesecret?accountIdentifier=px7xd_BFRCi-pfWPYXVjvw&projectIdentifier=Nishant_Test_Project&orgIdentifier=Nishant_Test_2' \
-H 'Harness-Account: <account_id>' \
-H 'x-api-key: replace_this_with_token' \
-F 'spec={"secret":{"type":"SecretFile","name":"<file_secret>","identifier":"<file_secret>","description":"","tags":{},"orgIdentifier":"<org_name>","projectIdentifier":"<proj_name>","spec":{"secretManagerIdentifier":"harnessSecretManager"}}}' \
-F 'file=@/path/to/the/file'
Replace <account_id>
, <file_secret>
, <org_name>
, <proj_name>
, and /path/to/the/file
with your actual data. This command sends a PUT request to update a secret file in Harness, specifying the file path and necessary headers.
Does Harness utilize the nodename Kubernetes API endpoint within the delegate to obtain the node metrics data of a worker node?
Harness itself does not directly utilize the /api/v1/nodes/<nodename>/proxy/stats/summary
endpoint for gathering node metrics data of a worker node within the delegate. However, if there is a specific need to access this data, users have the option to employ a shell script to query this endpoint and obtain the desired metrics.
What is the extent of Harness' integration with Microsoft Graph API and its permissions requirements for controlling access to resources like users, groups, mail, etc.?
The Harness application utilizes Microsoft Graph API for fetching a list of security groups when users exceed attribute limits in AAD (Microsoft Entra ID). Additionally, there's integration for SAML Group Authorization. It's important to note that there might be a need to pass the x-api-key header with a token (SAT/PAT) for invoking the Harness API from Microsoft tools.
When retrieving audit logs for ingestion into a SIEM tool, what are the considerations for using Audit Streaming via S3 bucket versus Audit trail via API?
The choice between Audit Streaming and Audit trail primarily depends on convenience and infrastructure support. If you are already using S3, you can seamlessly publish audit logs to it. Conversely, API-based access necessitates building state management to handle querying for the latest logs and manage failures. However, in terms of the data itself, there is no difference between the two methods.
How can I get all services using a cURL command?
To get all services using a cURL command, you can use the getServiceList
API and make a cURL request using a valid token. For more information, go to getServiceList in the API documentation.
Is there an API to create overrides?
To create overrides via the Harness API, you can use the service override API. For more information, go to ServiceOverrides in the API documentation.
Is there a Harness API to create overrides?
You can use the createServiceOverride
API to create overrides. For more information, go to Create a ServiceOverride Entity in the API documentation.
Are there any JEXL expressions to get all projects environment?
Harness doesn't currently don't have a JEXL expression to retrieve all environments, but you can utilize the get environments API endpoint to fetch all environments. For more information, go to getEnvironments in the API documentation.
How is the ingress.yaml file used?
In Kubernetes, an Ingress resource is used to manage external access to services within a cluster. The Ingress resource allows you to define how external HTTP/S traffic should be directed to your services, enabling you to expose services to the external world and define routing rules.
An Ingress resource is typically defined in a YAML file, often named ingress.yaml
. This file specifies the configuration for routing external traffic to different services based on rules such as hostnames, paths, and backend services.
By using Ingress, you can manage external access to your services more flexibly than using raw services or NodePort services. It provides a way to route traffic based on various criteria and allows you to handle SSL termination and other features. Keep in mind that the actual implementation of Ingress may vary depending on the Kubernetes cluster, as different cluster providers may have different Ingress controllers.
Why am I getting an error when adding users in the Harness UI?
Sometime when you try to add a Harness user in the UI, you might get an error. You can open the developer tools and check the API call for the error to see the response. The error might be due to user creation limits. You can either resolve it by removing unused users from your account or contacting Harness Support to validate the limit for your license.
How do I get an x-api-key for making an API call?
You need to create a new token under API key. For more information, go to Authentication in the API documentation.
Does Harness support authorization with API tokens?
APIs token are used for both authentication and authorization. For more information, go to Manage API keys.
Is there documentation for permissions references?
Yes, for more information, go to:
Can you link the docs to the API endpoint used to authorize a user with API token?
Harness has an API to to check whether you perform authorization using bearer or API key token. For more information, go to Get access control list in the API documentation. For API token categories: Service Account vs. Personal access tokens, go to Add and manage API keys.
How can I set my API key to expire in 24 hours?
An API key is created with a minimum duration of 30 days. You can rotate the token at any time.
What does 'parentIdentifier' refer to during the creation of an API key?
The parentIdentifier
in the context of creating an API key refers to the Parent Entity Identifier of the API key. This identifier indicates the entity or resource to which the API key is associated or belongs. It helps organize and manage API keys within the system by specifying their parent entity, such as a user, organization, application, or another relevant entity. When creating an API key, providing the appropriate parentIdentifier
ensures that the key is properly linked to the intended entity, allowing for effective access control and management.
How can I get a list of all users and their roles?
You can use the Get aggregated users API. This will provide with complete details of the users including the role they have. For more information, go to Get aggregated users in the API documentation.
We have hundreds of users that were granted the admin role on the account level as individuals. How can we remove this role?
You can use this API and create a script to update the user roles.
Is there any documentation for APIs we can use to fetch user details for a given userId?
Yes for more information, go to getUsers in the API documentation.
How can we export users from Harness?
Currently, Harness doesn't support direct functionality for exporting all users. To export users from Harness, you can utilize the getUsers API. For more information, go to getUsers in the API documentation.
Does Harness AIDA support APIs for developers to create custom AI/ML solutions?
No. AIDA does not offer Rest APIs to be used by Harness users.
How can I export all AutoStopping rules?
Currently, Harness doesn't support direct functionality for exporting all AutoStopping rules. To create a report of all your AutoStopping rules, Harness recommends using the List AutoStopping Rules
API method.
How can CCM Admin roles be removed from users who were directly assigned these roles?
In the past, as part of our product strategy, Harness granted all users the CCM Admin role by default. This policy has since been changed. If you want to revoke these role assignments, you must identify the affected users, retrieve their role assignments via API, and then proceed to bulk delete the specific role assignments.
Can I update my role with the core_governancePolicySets_delete permission using the UI (it is working through API)?
Yes, you're able to set these permissions through API because these are onboarded, but the backend is currently not using them in the intended way. Hence Harness removed them from the UI and is working to release this feature soon.
When making service-to-service calls, is it recommended to reuse the Bearer token received from the calling service's API in the Authorization Header for the destination service's platform API?
In service-to-service scenarios, a best practice is to transmit only the principal information without including the Authorization Header. This allows the destination service to handle authorization based on the provided principal details. Additionally, users have the flexibility to designate whether the call is Privileged or non-Privileged. For non-Privileged access, maintaining the principal as the end user is often suitable. Users are encouraged to refer to the platform's official documentation for comprehensive guidance on token creation and authentication for platform API calls. If further assistance is needed, contacting the platform's support team is recommended.
Does Harness have documentation to implement ACL checks in log-service?
Yes, for more information, go to getAccessControlList in the API documentation.
Can I access the Harness API from a React app, and how can I handle CORS issues when making API calls with the x-api-key header?
Yes, the Harness API is accessible from the React (or any JavaScript library) app. However, when encountering Cross-Origin Resource Sharing (CORS) issues, it's crucial to understand that browsers make pre-flight CORS requests, especially when the host origin and the server origin are different.
To resolve CORS issues:
- Same Origin: If your UI and API share the same origin (for example, UI and API both on
app.harness.io
), there won't be CORS calls. - Different Origin: If your app is on a different origin (for example,
example.com/harness
) and makes non-GET requests toapp.harness.io/api/
, the browser initiates a pre-flight request. - Server Configuration: Ensure your API server includes the necessary CORS headers, such as access-control-allow-origin and access-control-allow-headers, to explicitly allow the requesting origin and any custom headers like x-api-key.
By configuring your server to allow the necessary origins and headers, you can address CORS issues when making API calls from your React app. This ensures a smooth interaction with the Harness API while securing your application.
Does Harness plan to support AsyncAPI specs (for messaging) in Harness APIs?
This has not been planned yet.
Is there a way to obtain data on monthly active users (MAU) on the Harness Platform?
You can retrieve information about user logins from the audit log. If you need to do this through an API, an audit log API is available. However, Harness doesn't have a consolidated view or report of all the users who have accessed the Harness Platform.
Can I safely use API endpoints marked as beta?
API endpoints labeled as beta have been tested by our teams and are generally safe for consumption. However, Harness cautions against using them for critical workloads, as they are not classified as stable yet.
How can I find the status (failed/pass) and reason for a verification step using the graphQL API?
You can use the workflow/pipeline grapnel API for execution. The failureDetails
field provides the information.
What is the API used to pull a list of users and their roles from a specific project?
The List role assignments API enables you to pull a list of users and their roles from a specific project. For more information, go to List role assignments in the API documentation.
How are Create APIs supposed to work as if we are creating API it won't be having permission and will return false? How do we restrict creation of resources?
There are two types of scope, one is complete scope(which indicates ALL) and the other is specific.
- To allow creation of entity in certain scope, it means allowing to creation that entity at complete Scope level (which indicates ALL).
- If the use case is to allow Create Governance policy at scope and restrict edit to specific policies, then ideally you should split it into specific Create and Edit permissions.
- And then define 2 Role Assignments. One with Create and All Governance policy. One with Edit and Specific selected Governance policies.
Are there RBAC permissions on Audit Trail in NextGen like there are in FirstGen?
This feature is not currently in NextGen, but Harness does have viewer permissions in place.
What are the NextGen default project admin permissions?
When you create a project using the API, by default the Project inherits the project admin permissions on creation from the Service Account where the API token was generated.
How do I check Harness API token validity?
When you create a token in Harness under Service Account, the validity of the token is determined based on how it was created. If you have specified an expiry date, the token will expire on that date. However, if you want the token to never expire, you can select the No Expiration option.
How do I fetch delegate disconnected status via the API?
{delegateList(filters: [{accountId: "xxxxx"}], limit: 10) {
nodes {
delegateName
ip
status
disconnected
version
hostName
lastHeartBeat
}
}
}
Why do I get a 400 error when creating a connector via the Create Connector API?
When using the Create Connector API, invalid characters (such as parenthesis) in the name can cause Bad Request (400) errors, such as:
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url https://app.harness.io/gateway/ng/api/connectors?accountIdentifier=\<ACCOUNT_IDENTIFIER>?
What rate limiting policy does Harness employ for API requests?
Harness imposes a rate-limiting policy on API requests to ensure system stability. This policy sets a limit of 350 queries per minute (QPM) and 5.833 queries per second (QPS) for all external-facing APIs. For more information, go to Platform rate limits.
Can I get user group and user lists in CSV or Excel?
No, Harness doesn't currently support this functionality.
You can use the 'getUsers` API to get a list of users that you can parse to create a CSV file. For more information, go to Get users in the API documentation.
How many types of API tokens are there?
There are two types of API tokens, one can be created at the user profile level. These are prefixed with pat.xxxx....
, meaning personal account token. The second one can be created at the service account level, which is prefixed as sat.xxxxx....
, meaning service account token.
How do we assign permission to the API tokens?
Harness doesn't assign permission directly to the account tokens. They inherit permissions from the user if they are created at the user profile level, or the service account if they are created at service account level.
How can I revert the "externally managed" status of user groups if they were managed by SCIM earlier?
If user groups were previously provisioned via SCIM and marked as "externally managed," you can update it by updating the "externally managed" field back to false via Terraform or API.
Which API fetches all users in Harness?
You can use the following to fetch all users in Harness.
curl --location --request GET 'https://app.harness.io/gateway/api/users?accountId=enter_accountid_here&limit=3000&offset=0' \
--header 'authority: app.harness.io' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'adrum: isAjax:true' \
--header 'authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'referer: https://vanitytest.harness.io/' \
--header 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-origin'
I have a large list of users to fetch, but the API has a limit of 100 and takes lot of time. Do I have an alternative?
To retrieve the list of users from API, you can use the following curl command.
curl --location --request GET 'https://app.harness.io/gateway/api/users?accountId=<AccountId>&limit=3000&offset=0' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: Bearer ${token}' \
Why am I getting an error when I try to create an API key?
Invalid request: Maximum limit has reached
This error indicates that you've reached the maximum amount of API keys available for your user. Harness has a limit of 5 API keys per user. To resolve this error, delete one of your existing API keys or use a service account instead.
Is there an API call to fetch an API key?
There's no API to get an api-key value as Harness does not store the API token for future reference.
Authentication
As I migrate from FirstGen to NextGen and use Okta for SCIM, I've noticed our user groups haven't migrated. Is there an additional step I need to take?
Yes, to ensure that your user groups migrate correctly when moving from FirstGen to NextGen platforms and continue using Okta for SCIM, you must configure a new SCIM app specifically for the NextGen platform.
Can we obtain the account's private key from the delegate without resorting to a PAT token?
No, it is not possible to obtain the account's private key from the delegate, even with a valid Personal Access Token (PAT). The delegate uses a secure token for encrypted communication with Harness Manager. However, this communication framework does not provide a method for accessing the account's private key directly through the delegate.
This limitation is by design to uphold security protocols. Delegates often operate with scoped permissions at the organization or project level, and allowing access to the account's private key via a delegate would pose a significant security risk. Therefore, regardless of the delegate's ability to communicate with Harness Manager, access to the account's private key is strictly controlled and not available through delegate operations.
Does Harness SAML work with any SSO provider?
Yes, Harness provides support for Okta and Azure OneLogin out of the box, but you can add any custom SSO with Harness. All you need is the Harness SAML endpoint URL and SAML metadata file.
How do I resolve Okta provisioning errors due to user limits?
Perform a sync within Okta to resolve the user limit error during Harness provisioning.
Why do I get an error for my Jit-provisioned user when I try to update via SCIM?
If you're utilizing SCIM, Harness recommends that you provision your users exclusively through SCIM rather than Just-In-Time (JIT) provisioning. This is because when a user is initially provisioned, their fields are updated according to the method of initial provisioning.
To resolve the issue, remove and then re-add the user, ensuring that they are now managed by SCIM.
What could be the potential reasons for encountering errors when utilizing a Harness-created user group Single Sign-On (SSO) link, particularly when the identical group is pushed from SCIM?
This is expected behavior because the user group is linked to an SSO group through group authorization, making it unmanageable via SCIM.
How can I update SAML-connected groups with a new name via API?
Set samlSettings
to null
in the API call to update SAML-connected groups with new names.
Can I use multiple SAML and SCIM apps with Harness?
Currently, this feature is behind the feature flag PL_ENABLE_MULTIPLE_IDP_SUPPORT
. Contact Harness Support to enable the feature.
Harness supports multiple identity providers (IdPs) for user authentication using SAML. You can configure a mix of various SAML providers and enable or disable them for user authentication. For more information, go to Multiple identity providers.
Why is Harness redirecting to a stage/dev account upon a successful Azure SAML login for a prod account?
Ensure that the entity ID is set correctly if you are using multiple accounts. If you are using a vanity URL, the entity ID needs to be set accordingly when setting up SAML in Harness and on the Azure side.
Where is the attribute for Group Claim in Microsoft Entra ID?
For SAMl with Microsoft Entra ID (formerly Azure), under Enterprise Applications, select SSO Settings, then select Edit User and Group properties. Edit the Group Claim and validate that the attribute is set to Group ID. If it is set to any other attribute, you must provide that value when linking the Harness user group with the Microsoft Entra ID group using the authorization.
When creating multiple Harness apps in Microsoft Entra ID, why can't I use the app.harness.io entity ID?
The entity is unique for each application. You can use any entity ID and add it in the Harness UI when setting up SSO.
When we have a user group established through SCIM and others connected via SSO within the same IDP, how do both methods populate the users?
When a user group is created through SCIM, it synchronizes and directly creates the user groups and users within the IDP as they exist. However, for SSO-linked user groups, users are populated only when they sign in to Harness using SAML.
We removed users from a user group in our SSO app, why are they still in the Harness UI?
The synchronization with SSO-linked groups occurs exclusively upon user login to Harness. Whether it involves adding or removing users, these updates only take place during a login operation.
Which cron expression builder builder does Harness use for the LDAP sync schedule?
Harness uses Quartz for the cron expression builder in the LDAP sync schedule.
Does the HTTP step support EdgeGrid authentication?
You can pass the Client token, Access token, and Nonce as the header for the HTTP step for EdgeGrid authorization.
Why am I receiving a 400 status code error with an "unsuccessful HTTP call" message when using a Jira step in Harness?
The following 400 Invalid format error typically occurs when using a Jira step in Harness:
"Unsuccessful HTTP call: status code = 400, \
message = {"errorMessages": [,"errors": {"customfield_54321":"Invalid format. \
Expected an array of objects with either an Option ID or an existing value."}]}"
Often, this is related to the configuration of a custom field. In this case, the custom field customfield_54321
is an array field, and the provided value didn't match the expected format. It can also indicate that the Jira plugin in your Jira step isn't compatible with Harness because Harness doesn't provide the data in the required format for the plugin.
The error arises because the value that gets passed to Jira doesn't match the expected format. Jira expects the value to be in the format of an array of objects, and in the following example it has a string as its value:
"customfield_54321": [
{
"id": "12345",
"value": "Test Operations"
}
]
The error message indicates that Harness doesn't support this specific Jira plugin, leading to the formatting issue.
If you encounter a similar problem with this Jira plugin or any other plugin, it is recommended to reach out to your Jira support team to explore potential solutions. They can provide the necessary guidance and support to ensure the smooth and efficient operation of your Jira instance.
How does SCIM work in Harness, and what are its limitations?
SCIM in Harness is primarily used for user provisioning and de-provisioning. It simplifies user management but has limitations. SCIM does not handle role bindings or permissions directly. Admins must manage role bindings and permissions within Harness separately, even when using SCIM for user provisioning.
Why won't my user group SSO providers sync?
When you've connected your user group in the Harness UI with a Single Sign-On (SSO) provider like Okta, Microsoft Azure, and so on, you might encounter an issue where a user, present in the designated user group is unable to sign in.
The initial step is to verify if the synchronization process is functioning properly. The validation of group membership doesn't occur during the login process itself, as SSO login operates differently from group authorization.
Verify that the entity ID is correct and matches across both your SSO application and the Harness UI. Additionally, verify that the group attribute being utilized is correctly configured to ensure integration between the SSO provider and Harness UI.
What happens if a user's email domain changes and the user is provisioned via SCIM in Harness?
Harness will automatically detect the change and update the email address in Harness using the SCIM app. You won't need to manually update the user's email address.
How do I sync LDAP groups manually if the linked user group isn't syncing?
You can Navigate to the Authentication tab, go to the LDAP setting, and try the Synchronize User Group option.
I'm trying to link a SSO group. Why don't I see the option for my user group?
Confirm that group authorization is enabled for the configured SAML setup.
Why does my demo account receive a "SSO not enabled" message when attempting to sign in via SSO?
To verify whether your account has SSO enabled, do the following:
- Sign in to
https://app.harness.io/auth/#/signin
with your username and password. If you have forgotten your password, use the reset password option. After you log in, you can access your demo account. - Use the switch option. For more information, go to Switch account. Harness will prompt you for for SSO.
- Set the account as the default. The next time you sign in, you can use the SSO option.
How do I capture SAML Tracer information?
You can install the SAML Tracer extension in your browser.
With the SAML-tracer extension running, do the following:
- On the login page, select "X Clear" in the SAML tracer (top left) and then try to sign in.
- When the login session is captured, select Export and then attach this export to the ticket.
I have multiple Harness instances and use the Azure SAML app. Why is SAML redirecting to a different Harness instance instead of the one I intended?
If you have multiple Harness instances and use the Azure SAML app, it is possible that the SAML app may redirect to a different Harness instance than the one you intended.
To prevent this, make sure to specify the Entity ID below the Authorization when creating the SAML app integration in the Harness UI. This is especially important if you have both sandbox and production Harness instances.
How does JIT provisioning work for SAML SSO users?
Harness supports Just-in-Time (JIT) provisioning, automatically provisioning new users when they sign in with their SAML SSO credentials for the first time. To use JIT provisioning, ensure the feature flag PL_ENABLE_JIT_USER_PROVISION
is enabled for the account. For more information, go to Just-in-time user provisioning.
Do user permissions in Harness with JIT provisioning and SAML authentication inherit from the SAML provider, or do they require separate configuration in the Harness Account?
No, user permissions in Harness with JIT provisioning and SAML authentication do not inherit from the SAML provider. Permissions need to be explicitly configured in the Harness Account. The JIT provisioning process ensures that users are dynamically created in Harness based on SAML authentication, but their permissions within Harness need to be set up independently.
Does Harness support permission mapping or inheritance from external systems in any Single Sign-On (SSO) model?
No, Harness does not support permission mapping or inheritance from external systems, including in various Single Sign-On (SSO) models. User permissions must be explicitly configured within the Harness Account, and as of now, there is no support for permission discovery or synchronization from external systems. All permissions need to be manually configured within the Harness Account.
When I switch my Harness account, I get a login prompt, captcha, and the message "too many invalid login attempts, account blocked" despite having no invalid login attempts. Why does this happen?
This issue may arise due to several reasons:
- Authentication Requirement: If you are not a part of the Harness Support group, you may need to re-authenticate while switching accounts. This is a standard security measure.
- Resetting Password: It is possible that when you attempt to reset your password, it only affects the login attempt value in one cluster and not the other one. This discrepancy in the reset process can lead to login issues.
Ensure you are properly authenticated when switching accounts.
Why can't users log in the first time after adding Just in time (JIT) user provisioning?
The issue occurs after a user is set up via JIT the first time and tries to sign in via the Harness URL (app.harness.io
) directly.
First, the user needs to go to the SAML SSO app and select the Harness icon tile. This provisions the user in the Harness UI.
For more information, go to Just-in-time user provisioning.
Why does a user lose access to user groups when they sign in to Harness using SAML?
This situation can occur with SAML-based linked user groups because the SAML-based user group synchronization always occurs when the user logs in. Therefore, if there were any changes made from the SAML SSO Group Claims or if the group was removed from the app, the synchronization will take place at the next login.
If a user is blocked because entry wasn't cleared for their prod2 account from gateway, how can the user log in?
The user can directly log in using the https://app.harness.io/ng/account/AccountId/main-dashboard
deep link.
I'm a user with multiple accounts. Why can't I access some of my accounts?
Sometimes, this might happen due to an edge case. You can try to get to your account (not the default account) by using the deep link.
https://app.harness.io/ng/account/**accountidhere**/main-dashboard
What is linkedSsId in SSO groups?
linkedSsoId
is the UUID of SSO setting creating in Harness.
What is the Harness hosted GitOps IP address?
Access to Kubernetes clusters that are behind strict firewalls and not reachable from the public internet is restricted to authorized IP addresses only. To enable access to these clusters, Harness provides a list of IP addresses that must be configured on the clusters. For more information, go to GitOps allowlist.
Can I update an email address in a user account?
If users are provisioned via SCIM, then you can update the email in the SSO provider, and it will be updated in Harness.
If the users were added manually, you must remove them and add the new emails.
I have SSO enabled on my account. Why can't I log in?
It's common for users to encounter an issue while logging in. A user might have signed up for a personal account, or the user's default account might not have SSO enabled. In cases like this, the user can still log in using their username and password. If they have forgotten their password, they can use the Forgot Password? option and then try to log in again.
Does Harness support workload identity federation for authentication?
Harness supports workload identify for Google Secret Manager.
How do I set up 2FA in Harness?
You can use the QR code sent in the email to setup 2FA. You will also receive a secret key for your user in the same email. Use the code to set up the 2fa or use a third-party token generator to enter your 2FA secret key and have it generates a login code for you. For more information, go to Set up two-factor authentication.
Why can't I set up/reset MFA?
When 2FA is set as force-enabled on the account level by an admin of the account, users must set up the 2FA for their profile. It can be enabled by scanning the QR code sent in the email or using the secret key also sent in the same email using any authenticator app.
For more information, go to Set up two-factor authentication and Reset two-factor authentication.
How can I disable 2FA for a user?
Currently there is no easy way for Harness to disable the 2FA for a user. The user can disable 2FA in their profile if they lost access to the auth app. The user must reach out to their account admin and ask them to resend the 2fa code. Then the user can reset the 2FA auth app, sign in to the account, and disable 2FA from their profile.
How can I change my identity provider to OKTA from another other provider?
When you set up a new OKTA SAML and then migrate your users to it, you must set additional configurations in Harness. Harness requires the metadata XML file from OKTA with the configuration.
The permissions for Harness are managed by the User Groups present in Harness. In case of authorization, the user groups from SAML app are linked to Harness Local User groups.
For more information, go to Single Sign-On (SSO) with SAML.
Which authentication method should we use when setting up a vault connector for delegates hosted on an Azure VM?
For Hashicorp Vault, there are 5 types of Auth supported. Except AWS Auth and Token (not recommended because they need periodic renewal), any of other 3 work, depending on your setup and preference. For more information, go to Add Hashicorp Vault step 2 overview.
Why does the reset password link keep sending me back to the login page?
The account password authentication might be disabled with another auth enabled, such as Active Directory. Reach out to your Active Directory Administrator to reset it.
How can I prevent lockouts when using SSO for login?
To prevent lockouts or in the case of OAuth downtime, a user in the Harness Administrators Group can use the Local Login URL http://app.harness.io/auth/#/local-login
to log in and update the OAuth settings.
For the Harness production cluster prod-3, the local login URL is https://app3.harness.io/auth/#/local-login
.
Can I pull from multiple Okta providers for different teams with unique RBAC/group needs?
No, Harness only supports one SSO provider at a time, which you configure at the account scope.
What is the required permission to add a SMTP configuration? I am getting a "Missing permission core_smtp_edit on smtp" error when I try to add Authentication Settings or Account Settings.
The permission needed for this Account Admin. Currently, only an Account Admin can edit the SMTP configuration.
Is there functionality to auto-accept invites for username/password login?
No. This option is available for SAML-based logins because authentication is handled by the SAML provider. For username/password logins, you must create a password in Harness.
I have 2FA enabled. Why can't I log in?
Send a request to your admin to resend the 2FA. You can reset the 2FA in your authenticator app or use https://totp.danhersam.com/
to enter the secret key and generate the code to log in.
What are the required permissions for SCIM tokens?
To perform SCIM operation with a token, the Service Account needs to have the mandatory permission in the role. Only the User/User Group permission should be assigned to the service account to perform SCIM operations with the created token.
How can I disable Local Login in my Harness account?
Contact Harness Support to enable the feature flag DISABLE_LOCAL_LOGIN
to disable local login for the account.
Why don't I have the Launch NextGen button in the FirstGen UI after logging in?
There are permissions for the User group Hide NextGen Button under Account Permission in any User Group. Make sure this is toggled to Off, or you won't see the Launch Next Gen option in the UI.
What causes user login issues when users are part of multiple accounts?
If you have multiple accounts and one of them uses SAML login while the others use username and password, you need to ensure that the SAML account is set as the default account. Otherwise, the SAML login mechanism won't work as Harness considers the login mechanism of the default account only.
If there are some users that were manually added to the account, will they be removed once the SCIM integration is configured/enabled for the account?
No, manually added users will not be removed after SCIM integration is added, they continue to be part of account.
What happens if the same user was manually added first and is part of the SCIM?
If a user is added manually first and then pushed from SCIM, the user will be marked as externally managed. From that point forward, SCIM will be responsible for updating the user's information such as name and email.
I have set up SAML successfully. Why doesn't the link populate to SSO inside the user group?
You need to enable authorization in your SAML.
Is SAML single logout URL supported?
Yes it is supported. You can configure this when setting up SAML.
Is there an expiry for 2FA secrets?
No, there is no expiry for 2FA secrets.
Is there any way to automatically accept an invite for local login users?
No, it's not possible because initially, the user must use the invite email to set their password. This is only possible when using SAML authentication.
What causes the "User is not authorized to access the account. Please contact your admin" error when trying to accept the invite and set up a local login password?
The most common reason for this failure is your account has domain allowlisting applied, and the domain used in your username is not in the allowed list. In this case, you can see the DOMAIN_WHITELIST_FILTER_CHECK_FAILED
on the Network tab.
Why do I receive errors with Okta SCIM provisioning?
Below are the steps you can use to troubleshoot SCIM provisioning with Okta.
Validate the SCIM Connector Base URL. This can be mistaken with the SAMl URL.
https://app.harness.io/gateway/ng/api/scim/account/<YOUR_ACCOUNT_ID>
Also, when you create the personal access token, make sure it has the required role bindings (admin).
Where is the currently set session inactive timeout value located?
You can find this value on the Authentication page (right below the Overview menu on the left). The field will be at the bottom of the page: Session Inactivity Timeout (in minutes)
.
Why is LDAP sync not working for some groups despite working fine for others, and even manual sync isn't helping?
The most probable root cause is that there is a difference in query for this user group/user (like DC), so check and confirm and add the corresponding user query.
Automation
How can I use Harness CD with Google Cloud Functions?
Harness CD pipelines help you to orchestrate and automate your Google Cloud Function deployments and push updated functions to Google Cloud.
For more information, go to Google Cloud Functions.
Is a create-namespace option available in Harness when deploying chart?
You can create a Kubernetes YAML file that defines only the namespace you want to use for your application and point to a manifest file containing just the namespace YAML. This means that using a shell script step in your deployment process to apply the namespace YAML file is straightforward.
Even a shell script step would be simple enough in this case, and you can use the kubectl command directly in the shell script to create the namespace.
What is the Perpetual Task (PT) iterator delay (Max delay from PT created, to PT being assigned if delegate is available)?
The max delay is 60 seconds. Harness runs the PT iterator every 60 seconds for task assignment.
What is the delegate poll interval for new PT tasks. (Max delay from PT being assigned to delegate picking it up and executing it, say there is only 1 delegate)?
It depends on task to task, you can find the interval for your task in the perpetualTaskScheduleConfig
in the dms db.
Connectors
Can Vault's dynamic AWS credential generation integrate smoothly with Harness's AWS Connector? Can this be done by importing a secret directly from Vault?
No, the Harness AWS Connector does not support direct integration with Vault for on-the-fly AWS credential generation, including for services like AWS ECR. The aws ecr login
command implies a potential for token generation, but integrating this process directly with the AWS Connector is not feasible. However, Harness does offer a Custom Secret Manager feature, which allows for the development of custom scripts to dynamically retrieve AWS credentials from Vault. This option provides greater flexibility but requires setting up custom logic rather than simply importing a secret's path from Vault.
What steps can we take to prevent encountering 429 errors when using DockerHub connectors in Harness?
If you are facing 429 rate limiting errors when attempting to pull Docker images from DockerHub using Harness, you can mitigate this issue by adjusting your authentication settings:
-
Authentication Method: By default, Harness utilizes anonymous access to the Harness Docker Hub for image pulls.
-
Switch to Username and Password Authentication: To overcome rate limiting issues, select "Username and Password" as your authentication method in your Docker connector configuration.
-
Provide Login Details: Once you've selected "Username and Password" authentication, enter your DockerHub login credentials (username and password) in the connector settings.
By configuring Harness to use your DockerHub credentials, you ensure that you have the necessary access privileges to pull images without encountering rate limiting issues.
These adjustments will help you avoid 429 errors and ensure a smoother experience when working with DockerHub connectors in Harness.
How can I retrieve a specific type of connector across multiple accounts, organizations, and projects using the API?
Unfortunately, it's only possible to retrieve all connectors within a specific scope, the following attribute includeAllConnectorsAvailableAtScope
allows you to retrieve easily all connectors above the project scope using the API Method Fetches the list of Connectors corresponding to the request's filter criteria
.
How do I setup SMTP with AWS SES?
Go to the AWS documentation on SMTP credentials to create SMTP credentials using the SES console. Then, supply those SMTP credentials in your Harness SMTP connector configuration.
Create Connector API seems to not work for orgs and failing with the error INVALID_IDENTIFIER_REF while trying to create a vault connector.
Confirm that the token is correct and that you're using the org or account prefix before passing the secret reference.
Are trial accounts able to use the GitHub connector to attach their GitHub account?
Trial accounts are able to use the same functionality as paid accounts during the trial time period.
Is there a feature to route info/error diagnostics through the Harness network?
At this time, the feature is not yet available. The delegate sends information and error diagnostic logs directly to the Harness Stackdriver in the Google Cloud. This traffic does not go through the Harness network, but directly to the Google Cloud network. However, if you prefer not to send diagnostic logs, there is an option to disable this feature.
For more information, go to Delegate logs.
Will the Cloud Connector propagate the tags to AWS calls?
No, The cloud connector will not propagate the tags to AWS while making calls.
Where can we view AWS call logs?
Harness has limited logging for AWS calls.
How do delegate selectors work in connectors?
The delegate selector in a connector always works as AND and not OR. Let's say you have delegate A named "ABC" and delegate B named "BCD".
In the connector selector options, you will need to give only 1 tag, either "ABC" or "BCD". If you need to have multiple delegates, you must add custom tags to the delegate and specify the common one in the selector.
Why can't I delete a connector referenced by an entity that is no longer present?
You can delete a connector referenced by an entity that is no longer present by enabling the Force Delete option in default settings.
Delegates
Is there documentation where we can see examples of payloads/data the delegates send to Harness?
There isn't exhaustive documentation available that describes all the types of data that delegates send to the Harness Manager. All data is secured via HTTPS and varies depending on the use case. For Continuous Delivery (CD), examples include variables, context data, logs viewed in the UI, status updates of tasks/steps, and general health checks.
It's important to note that sensitive data, such as secrets, are not directly sent; instead, secret expressions are evaluated at runtime by the delegate to ensure security. To obtain specific examples of delegate payloads, customers can set up a man-in-the-middle (MITM) proxy on a delegate to log the data being transmitted during pipeline executions. This approach allows customers to see the exact data being communicated.
Does Harness have account-level delegates?
Yes, Harness offers account-level delegates. You can create them by navigating to Account Settings > Account Resources > Delegates.
You can install delegates at the account, org, or project level.
What is the base image of the Harness Delegate?
Harness Delegate is a Red Hat Enterprise Linux (RHEL)-based image. A Windows-based image is not available. For more information, go to Delegate image types.
Does the DELEGATE_RESOURCE_THRESHOLD check the memory threshold on the request resource or limit resources of the delegate pod?
The DELEGATE_RESOURCE_THRESHOLD
environment variable is deprecated. Use DELEGATE_MEMORY_THRESHOLD
and DELEGATE_CPU_THRESHOLD
instead. For more information, go to Configure delegate metrics.
Why does the Helm CLI install fail for the minimal delegate?
Helm now recommends using the get_helm.sh
file to download the Helm binaries, which requires openssl. The minimal delegate doesn't include openssl, so it must be installed before installing Helm.
Can we install multiple versions of Helm on the delegate?
Yes, you can have multiple versions of Helm on the delegate, but only the Helm CLI to which the environment points at delegate startup can be used in the default step.
Are there any differences between minimal and non-minimal delegate images besides third-party binaries?
No, from a Harness delegate code perspective, the only difference between minimal and non-minimal delegate images is the bundled third-party binaries.
Why did step logs disappear?
If step logs disappear from pipelines that are using a Kubernetes cluster build infrastructure, you must either allow outbound communication with storage.googleapis.com
or contact Harness Support to enable the CI_INDIRECT_LOG_UPLOAD
feature flag.
You must restart your delegate after you enable the CI_INDIRECT_LOG_UPLOAD
feature flag.
For more information about configuring connectivity, go to:
Does the default Harness Delegate include jq?
Harness keeps the delegate image as minimal as possible so, it does not include jq
by default. To install jq
on the delegate, you must add it to the INIT_SCRIPT
in the delegate manifest. For more information, go to Add your custom tools.
What is the delegate minimal image?
The delegate minimal image serves a crucial role in vulnerability mitigation. By design, it excludes third-party client tools, thereby significantly reducing the potential for Common Vulnerabilities and Exposures (CVEs). This ensures a lean and secure environment, minimizing the attack surface and enhancing overall system integrity.
The delegate image has a minimal tag. For example, yy.mm.verno.minimal
.
Why isn't my delegate starting with a "Failed to build trust key store" message?
The default Java truststore uses a default password. If this password is changed, it must be provided to the JVM using JVM args. Otherwise, the JVM will attempt to read the truststore with the default password and fail with the message Failed to build trust key store
.
Why am I getting a retry failed message in my delegate logs?
You might get the following error in your delegate logs.
io.harness.delegate.task.citasks.vm.helper.HttpHelper - Retrying failed to check pool owner.
The logs are standard and won't impact functionality. Harness conducts capability checks before assigning tasks to delegates to verify their connection to the VM runner. If a delegate fails to connect, it's skipped for that task. You can disregard these logs.
Does the Docker delegate also show expiry message in UI if the image is older than the expiry threshold?
Yes, Docker delegates also show the expiry status in the UI if the image is beyond the expiry threshold.
How do I check the logs for commands specified in the INIT_SCRIPT?
During pod initialization, the commands in the INIT_SCRIPT
are executed. Check the Kubernetes pod log to see all command execution logs.
Is it possible to configure the delegate to continue running tasks for an additional 1-2 minutes after revoking the delegate?
No. After revoking the token, the delegate will disconnect within 5 minutes. If there are any tasks running, those that can complete within 5 minutes will finish successfully, but tasks taking longer than 5 minutes will fail.
For more information, go to Revoke tokens.
Why would a Helm delegate fail to start, as indicated by the error message: Pod "xxxxxx" is invalid: spec.containers[0].resources.requests: Invalid value: "1": must be less than or equal to cpu limit?
The error message suggests that the pod for the Helm delegate failed to start due to an invalid CPU resource request, indicating that the CPU request exceeds the limit set for the container.
To resolve the issue:
- Identify the cause: The error indicates an invalid CPU resource request, possibly exceeding the container's CPU limit.
- Check Helm chart modifications: If modifications were made to the Helm chart locally, they might have caused discrepancies in deployed values. Utilize the Helm template to inspect YAML values for debugging.
- Adjust namespace limits: If applicable, ensure that there are no namespace limits conflicting with the Helm delegate installation. If found, consider changing the namespace to resolve the issue.
How can I check the current customized version of a delegate using APIs, and how does the delegate upgrader access custom images?
Harness an API to get the latest delegate version for an account and one to override the latest for the upgrader. Currently, there isn't an externally exposed API to retrieve custom images. However, the delegate upgrader accesses a specific API to fetch the custom image when needed.
Can I use an earlier Harness Delegate version?
Yes, but Harness doesn't recommend using delegate images that are not current. However, if you require an earlier image version, check the repository on Docker Hub.
Is the delegate upgrade schedule configurable?
Yes, you can configure the delegate upgrade schedule. For more information, go to Configure the delegate upgrade schedule.
Does the execution of INIT_SCRIPT commands get logged in delegate logs?
No, INIT_SCRIPT
commands are run before the delegate process comes up and are not part of the delegate log.
Can delegates have HA if they're in different locations?
If there are delegates in different locations, they don't have HA. For example, if you have one delegate in a test environment and another in a production environment, the test delegate does not communicate with the production delegate. If a delegate in the production environment stops running, this stops production executions as there is no other delegate in production.
Can I run the apt-get command on the delegate pod?
No, the delegate is based on the RHEL. You can use the dnf or microdnf-based commands.
How do I install zip on the delegate?
You can run the following command to install zip on the delegate:
microdnf install yum
yum install -y zip
Is the DelegateManagerGrpcClientModule used for delegate connection to the manager over gRPC?
The DelegateManagerGrpcClientModule
streamlines gRPC communication between the delegate and Harness Manager. Its responsibilities include dispatching task executions and acting as a failsafe for transmitting task responses. For guidance on its optimal utilization, contact Contact Harness Support to ensure alignment with any supplementary or alternative configurations that might be in effect.
Where is the Kubernetes configuration (KubeConfig) stored on the delegate if it's being utilized for Terraform (TF) Kubernetes steps?
The Kubernetes configuration (KubeConfig) on the delegate is typically stored at ${HARNESS_KUBE_CONFIG_PATH}
. For more information, go to Harness Kubernetes expressions.
However, if you're unable to locate it at the specified path or within the delegate pod, it's important to confirm whether you're using built-in Terraform steps or running the Terraform CLI in a script and what stage type is being employed. For Terraform dynamic provisioning of infrastructure, you must create a Terraform file without the kube_config specification. In this scenario, since the Kubernetes connector is utilized, the delegate autonomously determines the context for Terraform.
How do I rename a Kubernetes delegate?
To change the name of a Kubernetes delegate, modify the following fields:
Secret.metadata.name
Deployment.metadata.labels.harness.io/name
Deployment.metadata.name
Deployment.spec.selector.matchLabels.harness.io/name
Deployment.spec.template.metadata.labels.harness.io/name
Deployment.spec.containers.envFrom.secretRef
Deployment.metadata.spec.template.spec.env.name: DELEGATE_NAME
Service.metadata.selector.harness.io/name
CronJob.metadata.labels.harness.io/name
CronJob.metadata.name
The DELEGATE_NAME
environment variable is specified as a YAML list item:
- name: DELEGATE_NAME
value: string
How do I rename a Docker delegate?
To change the name of a Docker delegate, set the DELEGATE_NAME
environment variable to the new name:
- DELEGATE_NAME = newnamedelegate
What are the Harness gRPC limitations?
If you do not enable gRPC connections, the following limitation applies:
Cloud Cost Management (CCM) does not collect events.
gRPC connections are not required for delegate version 23.12.81803 and later.
Do we run Harness Delegate as root?
Harness Delegates do not require root account access. Kubernetes and Docker delegates do, however, run as root by default. If you do not need to install applications during the initialization process (INIT_SCRIPT
), you can use a non-root account or install the application without the delegate.
Is the minimal delegate free of critical vulnerabilities?
Harness aims to minimize critical/high vulnerabilities within this image. Achieving complete mitigation isn't always possible due to the continual discovery of vulnerabilities in third-party libraries/tools without immediate remediation.
Where can we see validate the Harness minimal delegate vulnerabilities been addressed?
You can go to the Harness Trust Center. Harness publishes advisories for the latest delegate image.
How do I delete a Kubernetes delegate?
To delete the delegate from your Kubernetes cluster, you delete the Deployment object that represents its deployment.
kubectl delete deployment -n harness-delegate-ng <YOUR_DEPLOYMENT_NAME>
What is delegate allowlist verification?
Delegate allowlist verification is currently behind the feature flag PL_ENFORCE_DELEGATE_REGISTRATION_ALLOWLIST
. Contact Harness Support to enable the feature.
When the feature flag is enabled, delegates with an immutable image type can register if their IP/CIDR address is included in the allowed list received by Harness Manager. Without this feature flag enabled, delegates with an immutable image type can register without allowlist verification. The IP address/CIDR should be that of the delegate or the last proxy between the delegate and Harness Manager in the case of a proxy. Harness Manager verifies registration requests by matching the IP address against an approved list and allows or denies registration accordingly.
How do I configure the delegate grace period?
Open the delegate manifest file and locate the container spec
(spec.containers
). Change the terminationGracePeriodSeconds
as shown in the following YAML. In the example below, terminationGracePeriodSeconds
is set to 10 minutes.
spec:
terminationGracePeriodSeconds: 600
restartPolicy: Always
containers:
- image: example/org:custom-delegate
imagePullPolicy: Always
name: delegate
securityContext:
allowPrivilegeEscalation: false
runAsUser: 0
Is mTLS supported between the delegate and connectors in Harness?
No, mTLS isn't supported between the delegate and connectors in Harness. While mTLS is implemented between the delegate and Harness Manager, connectors act as logical entities facilitating connections between Harness Manager and external systems via the delegate. As such, there's no direct connection between connectors and the delegate that requires securing via mTLS.
When the NextGen delegate updater job terminates a delegate, does it consider whether jobs are running, and what is the associated grace period?
Yes, the NextGen delegate updater job accounts for running jobs before terminating a delegate. A termination grace period of 10 minutes is set. For more information, go to Graceful delegate shutdown process.
Upon updating the delegate image, the updater will spin up a new delegate, wait for it to become healthy, and then terminate the old pod. The old pod will stop accepting new tasks, allowing currently executing tasks to finish within the 10-minute grace period before force termination.
How are inactive delegates managed in Harness NextGen, and what is the behavior of Kubernetes deployments when a node is shut down and restarted?
In Harness NextGen, inactive delegates are automatically removed from the UI either immediately (if gracefully shut down) or within 6 hours (if not). Kubernetes deployments running on a shutdown node will spin up on another available node upon restart, following Kubernetes deployment controller behavior. When the node restarts, Kubernetes will start the pod, which will register and then reappear in the UI.
It's important to note that during the period of node shutdown, the delegate will not be visible in the UI. Delegates that are entirely deleted from a node will also disappear from the UI within 6 hours, and this timing cannot be changed.
Can priorityClassName be set on delegate pods using the delegate Helm chart field to assign appropriate priorities?
Currently, you can't set the priorityClassName
on delegate pods using the delegate Helm Chart field.
Why might a customer experience issues with their delegate unable to find the Helm utility, which resolves after delegate restarts, and could this be related to frequent gRPC Quota exceeded errors?
The issue of the delegate being unable to find the Helm utility could be related to the binary being deleted or a change in the PATH environment variable. It's worth investigating if any steps or pipelines running on the delegate might be causing this. Additionally, the frequent gRPC Quota exceeded errors are likely unrelated and do not result in any loss of functionality.
Is there a way to disable auto-upgrade for legacy delegates in Harness?
No, you can't disable auto-upgrade for legacy delegates. However, Harness recommends that you use delegates with an immutable image type, which has the auto-upgrade off feature. For legacy delegates, in case of incidents or emergencies, you can temporarily use an older delegate version until the underlying issue is resolved, but this is only for a limited time.
For more information on turning off auto-upgrade for Kubernetes immutable image type delegates, go to Disable automatic upgrade on an installed delegate image.
How does the DELEGATE_TASK_CAPACITY feature flag affect the behavior of CI run steps in Harness?
The DELEGATE_TASK_CAPACITY
feature flag allows you to configure the maximum number of tasks that can run simultaneously. For instance, if DELEGATE_TASK_CAPACITY
is set to 2 and there are 6 tasks running in parallel, Harness Manager will execute only 2 tasks at a time. However, if DELEGATE_TASK_CAPACITY
is not configured, all 6 tasks will run in parallel. Contact Harness Support to enable the feature flag.
When do delegates expire, and how does expiration affect their compatibility?
Six months after a delegate image is released, the delegate reaches End of Support (EOS). Eight months after a delegate image is released, the delegate is End of Life (EOL). Delegates expire if not upgraded 6 months after the image is released. If delegates are past their EOS date, Harness does not support them. Expired delegates might not work as intended. For issues with expired delegates, Harness Support will request that you upgrade your delegate(s).
If you do not have automatic upgrade enabled, Harness recommends upgrading the delegate at least once per quarter. You must update the delegate every 8 months.
For more information, go to Delegate expiration policy.
Can I do additional encoding of the Harness Delegate token?
No, additional encoding is not supported for delegate tokens.
I can see that a legacy delegate is a statefulset object. What does this mean? What's the major difference from Deployment type?
StatefulSet:
-
Purpose: StatefulSets are designed for stateful applications that require stable network identities and stable storage. Instances: StatefulSets maintains a sticky identity for each pod. Each pod has a unique and stable hostname, allowing for persistent storage and network identities.
-
Naming: Pods in a StatefulSet get named predictably and consistently, which is often based on an index.
-
Scaling: Scaling stateful applications may involve more complex operations due to the need for stable identities. Pods are typically created in sequential order, and scaling may involve specific considerations for data migration or coordination.
Key Difference: The major difference between a Deployment and a StatefulSet lies in how they handle the identity and state of the pods:
-
StatefulSet provides stable identities: Pods in a StatefulSet have stable and predictable identities, making them suitable for applications that require persistent storage and network identifiers.
-
Deployment is more suitable for stateless applications: Deployments are well-suited for applications where each instance is interchangeable, and statelessness is a design principle.
What is exit status 127 in a delegate pod?
In a Kubernetes context, when you see an exit code of 127, it is typically associated with issues related to the execution of container commands within a pod. Here are some common scenarios in a Kubernetes context:
Command or Binary Not Found:
- The container might be trying to execute a command or binary that is not installed or not available in the container's filesystem. Ensure that the necessary commands or binaries are included in the container image.
Incorrect Path or Command Name:
- If there's a mistake in the path or the name of the command specified in the Kubernetes pod definition, it could result in a 127 exit code. Double-check the command configuration in your pod specification.
Permissions Issues:
- Ensure that the container has the necessary permissions to execute the specified command. This includes both file system permissions within the container and the user permissions under which the container is running.
Image or Container Initialization Failures:
- If the container fails to start or initialize properly, it might result in a 127 exit code. Check the container logs for any error messages that might indicate initialization issues. When debugging a pod with an exit code of 127, you can inspect the pod logs to get more details about what went wrong. Use the following command to view the logs for a specific pod:
kubectl logs <pod-name>
Replace <pod-name>
with the actual name of your pod. Examining the logs can provide insights into the specific command or process that failed and help you diagnose and resolve the issue.
How can I receive a notification when the delegate's heartbeat connectivity fails?
Harness doesn't currently support direct notifications for failures in the delegate's heartbeat connectivity. However, you can monitor your delegates using Prometheus metrics.
For more information, go to Configure delegate metrics.
How can I extend the time before a delegate is disconnected from the manager when the API token is revoked?
This is not configurable; once the token is revoked, the delegate will get disconnected immediately. However, you can have a delegate in the account running continuously, which can execute all tasks. This way, when you revoke tokens for other delegates for testing, there will be at least one delegate in the account available to run the task.
Can we use persistent volume as tmpdir for delegates?
Yes, use persistent volume as tmpdir for delegates.
How can we remove a legacy delegate and use a delegate with an immutable image type?
You can stop the legacy delegate and download new YAML from the Harness UI to install a delegate with an immutable image type. For more information, go to Delegate installation options.
Is there documentation to install delegates and add GCP connectors?
Yes, for more information, go to:
When will the kubectl version be updated in the default Harness Delegate image?
Harness is in the process of upgrading the Kubectl version. The version upgrade will be completed soon.
What does DELEGATE_CPU_THRESHOLD do?
By default, delegate task capacity is based on the number of tasks. Some tasks consume far fewer resources than others. Enabling DELEGATE_CPU_THRESHOLD
allows the delegate to take tasks based on available resources (CPU) instead. If the delegate is overloaded, it will reject tasks.
For more information, go to Configure delegate resource threshold.
How can I fix the delegate out-of-memory error?
The delegate throws an error indicating java.lang.OutOfMemoryError
or that the delegate has run out of heap space. The container has run out of memory or the delegate has exceeded heap space.
Review the container's memory usage. Harness recommends that you use Xms
and Xmx
or MinRAMPercentage
and MaxRAMPercentage
JVM arguments to adjust the heap size of the delegate. You can provide these arguments via the JAVA_OPTS
environment variable when you set up the delegate.
How can I remove a single disconnected delegate pod?
Delegate pods are automatically removed 7 days after they're disconnected.
Is there a way users can run all the pipeline steps on one specific delegate pod?
Yes, you can run all the steps on one specific delegate pod. For more information, go to Run all pipeline steps in one pod.
How do I install a Harness Delegate using Azure ACI?
You can use the following repository as a sample to install it through Terraform. (Terraform Example)[https://gist.github.com/rssnyder/40ebf23bc352a2fbf75005239367abcd].
How often does Harness upgrade the kubectl binary version within the delegate?
Harness doesn't have a regular upgrade schedule. For more information about delegate binaries, go to Supported platforms and technologies.
You can also customize the kubectl binary version using INIT_SCRIPT
.
Can we add a Custom Selector in the Harness Delegate chart for legacy delegates?
For legacy delegates, Harness doesn't have a way to specify a delegate selector or delegate tags in the delegate Helm chart. There is an API to get and update selectors for the delegates.
Why isn't the task_failed_total delegate metric reporting data despite step failure?
The task failed is when something unhandled happens, like a NPE in a task or issue at framework level. A valid failure like shell script exited with error code is not a task failure. Prometheus only shows the metric which are at least once recorded.
Why do we need core_delegate_delete permission to revoke delegate tokens?
When Harness makes an API call to revoke a delegate token, the delegates who are using it stop registering, thus necessitating the "delete delegate" permission for token revocation.
Does Harness provide customized Docker delegate images?
Harness doesn't provide custom Docker images for delegates; however, there is a Docker delegate file in the public Harness repo. You can use this as a sample reference to add any utility to the image.
Can we use delegates with an immutable image type in the statefulset deployment YAML for delegates?
You can't use the immutable image type in the statefulset deployment YAML for legacy delegates. The delegates are architecturally different. Delegates with an immutable image type must be used with their own deployment YAML. For more information, go to Delegate image types.
Can I enable more granular delegate logs?
There are no additional (non-default) log level settings for delegates.
Can we use custom temp space for delegates?
You can use the environment variable TMPDIR
on the delegate to add your directory path for temp storage.
- name: TMPDIR
value: /opt/harness-delegate/deployvol/tmp
How is the version of the immutable image type Docker delegate image managed and released to SMP?
The release of the Immutable Delegate version to SMP involves setting the IMMUTABLE_DELEGATE_DOCKER_IMAGE
version as an environment variable in the manager. When users download the YAML, this version is read from the environment variable, and SaaS utilizes pipelines to update MongoDB entries. During pod startup in SMP, the environment values are populated in the database, facilitating the direct retrieval of the Immutable Delegate version.
If the DELEGATE_CPU_THRESHOLD is set to zero, does the delegate reject all tasks?
No, if DELEGATE_CPU_THRESHOLD
is set to zero, it behaves as if the feature is off, and the delegate acquires tasks as normal without rejection.