feat(security): implement dynamic tactical license gate, instant key revocation, and clean hardcoded credentials
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
HttpStatus,
|
||||
Post,
|
||||
Query,
|
||||
Req,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { ApiHeader, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
@@ -26,6 +27,21 @@ import { TacticalService } from './tactical.service';
|
||||
export class TacticalController {
|
||||
constructor(private readonly tacticalService: TacticalService) {}
|
||||
|
||||
@Get('verify-license')
|
||||
@ApiOperation({ summary: 'Verify tactical clearance and military license' })
|
||||
async verifyLicense(@Req() req: any) {
|
||||
const tenant = req.tenant;
|
||||
const apiKey = req.apiKey;
|
||||
return {
|
||||
valid: true,
|
||||
tenantName: tenant?.name || 'Authorized Tactical Operator',
|
||||
plan: tenant?.plan || 'ENTERPRISE',
|
||||
keyName: apiKey?.name || 'Tactical Defense Key',
|
||||
rateLimit: req.rateLimit || 1000,
|
||||
timestamp: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
@Get('line-of-sight')
|
||||
@ApiOperation({
|
||||
summary: 'Calculate Tactical Line of Sight & Intervisibility (تبادل الرؤية العسكري)',
|
||||
|
||||
Reference in New Issue
Block a user