A web frontend for Microsoft Active Directory Certificate Services (ADCS) that provides a user-friendly state of the art web interface for requesting and managing certificates.
MS ADCS is slowly dying, there appears to be no further development. The web interface certsrv is now only cumbersome to access and has no modern features whatsoever, a REST API for automation is non-existent, ACME only works through workarounds. Nevertheless, the system does its job excellently, is easy to use, and anyone who has looked at other CA systems will find that the alternatives aren't perfect either. For this reason, I started the MSADCS-Resurrection project, which aims to bring the MS CA back to a state that can absolutely compete with other modern CA systems today and which is also ready for the future ahead.
- Web-based certificate request interface
- LDAP authentication and role-based access control
- Admin dashboard for certificate approval
- Multilingual interface (EN/DE)
- Configurable certificate templates
- Support for Subject Alternative Names (SAN)
- Automatic certificate creation via certreq
- Export in CER and PFX format
- Python 3.7 or higher
- Windows Server with ADCS (Certificate Authority)
- LDAP/Active Directory for authentication
- certutil and certreq must be available on the system
-
Clone or download the repository
-
Install Python dependencies:
pip install -r requirements.txt
- Create configuration file:
cp config.example.yml config.yml
-
Adjust configuration (see Configuration section)
-
Initialize database:
python
>>> from app import app, db
>>> with app.app_context():
... db.create_all()
- Start application:
python app.py
.
├── app.py # Main application and Flask routes
├── config.py # Configuration management
├── config.example.yml # Example configuration
├── ldap_auth.py # LDAP authentication
├── models.py # Database models
├── static/ # Static assets
│ ├── css/
│ │ └── bootstrap.min.css
│ └── js/
│ ├── bootstrap.bundle.min.js
│ ├── bootstrap.min.js
│ └── jquery.min.js
└── templates/ # HTML Templates
├── admin_requests.html # Admin overview
├── dashboard.html # Main dashboard
├── login.html # Login page
├── my_requests.html # Own requests
├── nav.html # Navigation
└── request.html # Certificate request
login.html
: Login form and authenticationnav.html
: Main navigation with language selection and user menudashboard.html
: Overview page with statistics and quick accessrequest.html
: Certificate request formmy_requests.html
: Overview and management of own requestsadmin_requests.html
: Admin interface for request processing
- Bootstrap 5.1.3 (CSS/JS)
- jQuery 3.7.1
- Custom styles and scripts in
/static
GET /login
: Login pagePOST /login
: Perform loginGET /logout
: Perform logoutGET /set-language/<lang>
: Change language
GET /
: DashboardGET /request
: Certificate request formGET /my-requests
: View own requestsPOST /api/request
: Request certificateGET /api/templates
: Get available certificate templatesPOST /api/generate/<request_id>
: Generate approved certificate
GET /admin/requests
: Admin overview of all requestsPOST /api/admin/approve/<request_id>
: Approve requestPOST /api/admin/reject/<request_id>
: Reject requestGET /api/admin/request-details/<request_id>
: Get request details
Configuration is done via the config.yml
file. Here are the main settings:
ca_server:
name: 'YOUR-CA-SERVER\CA-NAME'
connection_timeout: 30
certificates:
allowed_templates:
- name: Webserver
allow_san: true
enhanced_key_usage:
- 1.3.6.1.5.5.7.3.1 # Server Authentication
- 1.3.6.1.5.5.7.3.2 # Client Authentication
key_specs:
- RSA 2048
- RSA 4096
filter_templates: true
security:
secret_key: 'RANDOM-KEY' # Change this to a secure key
require_auth: false
allowed_domains: []
ldap:
enabled: true
server: "ldaps://your-domain.com"
base_dn: "DC=your,DC=domain,DC=com"
user_dn: "DC=your,DC=domain,DC=com"
bind_user_dn: "cn=serviceaccount,dc=your,dc=domain,dc=com"
bind_user_password: "your-password"
user_search_attr: "sAMAccountName"
groups:
cert_admins: "CN=CertAdmins,OU=Groups,DC=your,DC=domain,DC=com"
- Make sure to change the
secret_key
in the configuration - Use HTTPS in production environments
- Configure LDAP connection with valid certificates
- Restrict allowed certificate templates
- Enable approval requirement for sensitive templates
- Set secure passwords for service accounts
- Limit admin permissions to necessary users
-
Certutil Errors
- Ensure certutil is available in the system PATH
- Check service account permissions
- Verify CA server configuration
-
LDAP Connection Issues
- Check LDAPS URL and ports
- Ensure certificates are valid
- Verify service account permissions
- Check configured group DNs
-
Certificate Creation Errors
- Verify CA server configuration
- Ensure templates are available and allowed
- Check permissions for certificate creation
- Validate SAN entries
This project is licensed under the MIT License. See LICENSE file for details.
https://www.paypal.com/donate/?hosted_button_id=7NSHRFK434SPS