
Research
/Security News
Coruna Respawned: Compromised art-template npm Package Leads to iOS Browser Exploit Kit
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.
@point3/kms
Advanced tools
Point3 KMS module for NestJS applications. Provides a Guard and Service to verify KMS tokens.
고객사 KMS 토큰 검증을 위한 NestJS 모듈
npm install @point3/kms
KMSModule을 루트 AppModule이나 다른 기능 모듈에서 가져옵니다. forRoot() 정적 메소드를 사용하여 설정을 전달합니다.
Docker compose로 에이전트를 같이 올려 사용한다면 해당 에이전트 컨테이너의 hostname을 kms로 지정하면, 별도의 agentURL 설정을 하지 않아도 http://kms:3342로 설정되기 때문에 잘 작동합니다.
// app.module.ts
import { Module } from '@nestjs/common';
import { KMSModule } from '@point3/kms';
@Module({
imports: [
KMSModule.forRoot({
agentURL: 'http://your-kms-agent-url:port', // 실제 KMS 에이전트 URL로 교체하세요
}),
// ... 다른 모듈들
],
})
export class AppModule {}
만약 agentURL을 제공하지 않으면, 기본값인 http://kms:3342로 설정됩니다.
KMS 토큰 검증이 필요한 모든 컨트롤러나 특정 라우트에 KMSGuard를 사용하세요.
// your.controller.ts
import { Controller, Get, UseGuards } from '@nestjs/common';
import { KMSGuard } from '@point3/kms';
@Controller('protected-resource')
@UseGuards(KMSGuard)
export class YourController {
@Get()
getProtectedData() {
return '이 데이터는 KMS에 의해 보호됩니다!';
}
}
KMSGuard로 라우트가 보호되면, @KMSClientId()와 @KMSKeyName() 데코레이터를 사용하여 검증된 데이터에 직접 접근할 수 있습니다.
@KMSClientId(): 검증된 클라이언트 ID(p3Values.Guid 타입)를 주입합니다.@KMSKeyName(): 검증된 키 이름(string 타입)을 주입합니다.// your.controller.ts
import { Controller, Get, UseGuards } from '@nestjs/common';
import { KMSGuard, KMSClientId, KMSKeyName } from '@point3/kms';
import { p3Values } from 'point3-common-tool';
@Controller('user-data')
@UseGuards(KMSGuard)
export class YourController {
@Get()
getUserData(
@KMSClientId() clientId: p3Values.Guid,
@KMSKeyName() keyName: string,
) {
console.log(`요청 클라이언트: ${clientId.toString()}`);
console.log(`사용된 키: ${keyName}`);
// 여기에 로직을 작성하세요...
return {
message: '사용자 데이터에 성공적으로 접근했습니다.',
clientId: clientId.toString(),
keyName: keyName,
};
}
}
KMSModule.forRoot(option)모듈을 설정합니다.
option.agentURL (string, optional): KMS 검증 에이전트의 URL입니다.KMSGuard토큰 검증 로직을 처리하는 NestJS 가드입니다. Authorization 헤더와 클라이언트 IP 주소를 읽어 KMS 에이전트로 전송하고, 성공 시 요청 객체에 결과를 첨부합니다.
KMSGuard는 검증 과정에서 다양한 오류가 발생할 경우, 다음과 같은 NestJS 표준 예외를 던집니다.
ForbiddenException (403)
BadRequestException (400)
Authorization 헤더가 요청에 포함되지 않았을 때 발생합니다.Authorization 헤더의 형식이 Bearer <token>이 아닐 때 발생합니다.UnauthorizedException (401)
InternalServerErrorException (500)
이 외에도 KMS 에이전트와의 통신 중 발생하는 다른 HTTP 오류나 네트워크 오류는 해당 상태 코드에 맞는 예외로 변환되거나 원본 오류 그대로 전달될 수 있습니다.
@KMSClientId()요청 객체에서 clientId(p3Values.Guid 객체)를 추출하는 파라미터 데코레이터입니다. KMSGuard로 보호되는 경로에서 사용해야 합니다.
@KMSKeyName()요청 객체에서 keyName(string)을 추출하는 파라미터 데코레이터입니다. KMSGuard로 보호되는 경로에서 사용해야 합니다.
npm test
FAQs
Point3 KMS module for NestJS applications. Provides a Guard and Service to verify KMS tokens.
The npm package @point3/kms receives a total of 89 weekly downloads. As such, @point3/kms popularity was classified as not popular.
We found that @point3/kms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.

Company News
As AI accelerates how code is written and shipped, Socket is scaling to protect the software supply chain from the growing wave of attacks targeting open source dependencies.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.