Link Search Menu Expand Document

Broken Authentication in CI/CD

Play SecureFlag Play CI/CD Labs on this vulnerability with SecureFlag!

GitLab

Authentication in GitLab refers to the process of confirming the identity of users or systems trying to access its resources.

By default, GitLab supports a few different Authentication options.

Allow users to sign Up

The “Allow users to sign up” feature in GitLab provides an easy way for new users to create accounts on the GitLab instance. When user registration is left open, unauthorized individuals can create accounts, gaining access to the GitLab instance. Even if initial permissions are limited, just having access can be a starting point for further exploitation.

LDAP and Active Directory integration

GitLab can integrate with LDAP or Active Directory for authentication and authorization. This allows organizations to manage GitLab permissions based on their existing user and group structures.

Single Sign-On (SSO)

GitLab can integrate with identity providers, supporting protocols like OAuth and SAML, allowing users to log in with their credentials from other platforms, providing a unified login experience.

Personal Access Tokens

Personal Access Tokens offer a secure way to authenticate without using passwords for automated processes or tools that need to interact with GitLab. This can be useful for interacting with GitLab from scripts or other tools using the GitLab API.

SSH Key authentication

GitLab provides ways for users to authenticate via SSH keys, ensuring secure access for Git operations. Users can add their public SSH keys to their GitLab account to enable secure communication.

Always use strong authentication mechanisms and avoid exposing GitLab to untrusted networks, especially the internet. An unsecured GitLab instance can be an easy target for malicious actors looking to exploit systems or steal data.

Jenkins

Authentication in Jenkins refers to the process of confirming the identity of users or systems trying to access its resources.

By default, Jenkins supports a few different Authentication options.

Anyone can do anything

As the name suggests, this strategy grants full permissions to everyone, including anonymous users. In essence, it turns off the built-in authentication, allowing unrestricted access to Jenkins and all of its features. This setting is not secure and should not be used.

Allow users to sign Up

The “Allow users to sign up” feature in Jenkins provides an easy way for new users to create accounts on the Jenkins instance. When the user registration is left open, unauthorized individuals can create accounts, gaining access to the Jenkins instance. Even if initial permissions are limited, just having access can be a starting point for further exploitation.

Internal database

Jenkins has its own built-in user database where administrators can create and manage users directly within Jenkins.

LDAP and Active Directory integration

Jenkins can integrate with LDAP or Active Directory for authentication and authorization. This allows organizations to manage Jenkins permissions based on their existing user and group structures.

Single Sign-On (SSO)

Jenkins can integrate with identity providers, supporting protocols like OAuth, allowing users to log in with their credentials from other platforms, providing a unified login experience.

API tokens

API tokens offer a secure way to authenticate without using passwords for automated processes or tools that need to interact with Jenkins. This can be useful for interacting with Jenkins from scripts or other tools using the Jenkins REST API.

CLI authentication

Jenkins provides ways for users to authenticate via the Command Line Interface (CLI), ensuring scripts and tools have appropriate access.

Always use strong authentication mechanisms and avoid exposing Jenkins to untrusted networks, especially the internet. An unsecured Jenkins instance can be an easy target for malicious actors looking to exploit systems or steal data.

References

Jenkins - Security

Jenkins - Access Control

GitLab - Authentication

GitLab - Access Control