doc/auth/auth_practices.md
Follow these security best practices to protect your GitLab instance and maintain proper access controls. These recommendations help you maintain secure access without limiting productivity across your organization.
Establish fundamental security principles that form the foundation of your access control strategy.
This principle reduces security risks by limiting potential damage from compromised accounts or insider threats.
Organize permissions to match your organizational structure and reduce administrative overhead.
Layer multiple security controls to protect against various types of attacks and failures. If one control fails, others provide backup protection.
Implement strong authentication methods to prevent unauthorized access to your GitLab instance.
Passwords remain a primary authentication method despite their limitations. Strong password policies reduce the risk of credential-based attacks by requiring strong passwords that meet your organization's security standards.
Two-factor authentication (2FA) significantly improves security by requiring a second form of verification. Even if passwords are compromised, 2FA prevents unauthorized access.
Tokens provide secure, programmatic access to GitLab resources. Different token types serve different purposes and have varying security implications.
SSH keys provide secure, passwordless access to Git repositories. Proper key management is essential for maintaining security.
Control who can access what resources and monitor those permissions over time. Effective access management balances security requirements with operational efficiency.
Different user types require different access levels based on their relationship to your organization and security requirements. Properly classifying users helps enforce appropriate access boundaries.
Periodic access reviews ensure user permissions remain appropriate as roles and responsibilities change over time. Regular reviews help identify and remediate inappropriate access before it becomes a security risk.
Continuous monitoring of access patterns and permission changes helps detect security incidents and maintain compliance. Audit trails provide visibility into who accessed what resources and when.
Different organizational sizes and structures require different approaches to permission management. Adapt your access control practices to stay secure as you grow.
Focus on establishing good foundations without complex processes that could impede productivity.
Balance security requirements with the need for scalable processes.
Implement enterprise-grade controls and governance processes.
Protect your code, deployments, and automated processes from unauthorized changes and access. These controls ensure the integrity of your software development and delivery pipeline.
CI/CD pipelines often have elevated privileges to deploy applications and access sensitive resources. Securing pipeline execution prevents unauthorized actions and protects your deployment process.
Source code repositories contain your organization's intellectual property and need protection from unauthorized changes. Repository security controls ensure code integrity and prevent malicious modifications.
Automated processes and API integrations often use long-lived credentials with broad access. These non-human access patterns require special security considerations to prevent credential abuse.