How to Change Admins in CodeScene On-Prem?

In CodeScene On-Prem, administrative access is crucial for configuring authentication settings, managing users, and performing system-level actions. This article guides you through the process of changing or assigning a new admin, depending on the authentication method you're using: Internal Users, OAuth2/OpenID Connect, or LDAP/Active Directory.


Step 1: Log In Using the Built-in Admin Account

Regardless of which authentication method is configured, you can always access CodeScene as an admin using the fallback credentials:

  1. On the login page, choose the username/password option.

  2. Enter:

    • Username

    • Password: your CodeScene license key

Make sure you copy the license key without any trailing spaces or invisible characters.

This account has full administrative rights and is required to update authentication or user permissions.


Step 2: Update Admin Access Based on Your Authentication Setup

A) Internal User Accounts

If you're using CodeScene's internal user database:

  1. Go to ConfigurationAuthentication  →  Internal User Management.

  2. Locate the user you want to assign as an admin.

  3. Change the to Admin.

You can also create new users or remove admin rights here.


B) OAuth2 / OpenID Connect Providers

If your organization uses OAuth2 or OpenID Connect (e.g., GitHub, GitLab, BitBucket, Google Id, Azure AD):

  1. Navigate to ConfigurationAuthentication.

  2. Scroll to the Single Sign-On section and review the OAuth2 Authentication Provider settings.

  3. Ensure:

    • The correct group/team mapping is configured.

    • The new admin user belongs to the appropriate group in your identity provider.

  4. If needed, update:

    • Client ID, Client Secret

    • User Info Endpoint and Team Endpoint

    • JSONPath expressions to extract user info and group memberships

The new admin must already have appropriate group access defined in your external OAuth2 provider.


C) LDAP / Active Directory

If you're using LDAP:

  1. Go to ConfigurationAuthentication.

  2. Scroll to the LDAP Authentication Provider section.

  3. Confirm that:

    • The bind credentials and search base are correct.

    • The new admin is part of the appropriate LDAP group.

  4. Review or update the group-to-role mapping so that users in the specified LDAP group receive Administrator privileges in CodeScene.

This setup lets you manage roles centrally without modifying CodeScene's internal database.


Final Notes

  • Internal users can always be used as a fallback method for emergency access.

  • Always verify that the new admin user has appropriate rights on the external provider side (Git provider, SSO system, or LDAP group).

  • For long-term access control, it's a good idea to maintain at least one internal admin account.