{"id":16909571,"url":"https://github.com/yjdoc2/kerberos-js-module","last_synced_at":"2026-05-09T16:48:06.571Z","repository":{"id":100666813,"uuid":"255338194","full_name":"YJDoc2/Kerberos-JS-Module","owner":"YJDoc2","description":"Node package for giving an API over Kerberos protocol.This gives interface to create Authentication server, Ticket Granting Server, and Servers to be protected.","archived":false,"fork":false,"pushed_at":"2020-05-02T11:00:03.000Z","size":1769,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T16:28:56.554Z","etag":null,"topics":["kerberos-protocol","nodeje","security"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YJDoc2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-13T13:40:23.000Z","updated_at":"2020-09-28T08:11:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa20c946-9df5-4d41-9dc5-346cd4148717","html_url":"https://github.com/YJDoc2/Kerberos-JS-Module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FKerberos-JS-Module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FKerberos-JS-Module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FKerberos-JS-Module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJDoc2%2FKerberos-JS-Module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YJDoc2","download_url":"https://codeload.github.com/YJDoc2/Kerberos-JS-Module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244666290,"owners_count":20490283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kerberos-protocol","nodeje","security"],"created_at":"2024-10-13T18:56:24.512Z","updated_at":"2025-10-06T04:25:16.418Z","avatar_url":"https://github.com/YJDoc2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kerberos JS Module\n\nThis is a Javascript Module for implementing Kerberos Protocol.  \nThis does not actually implement the Kerberos Protocol at low-level api, but provides helper classes that can be used to implement Kerberos over some other protocol such as HTTP.\n\nFor More information on Kerberos Protocol, see \u003ca href='https://github.com/YJDoc2/Kerberos-JS-Module/blob/master/Kerberos.md'\u003eKerberos md\u003c/a\u003e file.\n\nFor API documentation see \u003ca href = 'https://github.com/YJDoc2/Kerberos-JS-Module/blob/master/API.md'\u003eAPI md\u003c/a\u003e file.\n\nThere is a corresponding python library of this project : \u003ca href='https://github.com/YJDoc2/Kerberos-Python-Library'\u003eKerberos Python Library\u003c/a\u003e\n\nAlso For example usage of this , check out \u003ca href='https://github.com/YJDoc2/Kerberos-Examples'\u003eKerberos Examples\u003c/a\u003e Repository. It contains commented examples of how to use this and python library.\n\n\u003cstrong\u003eNOTE\u003c/strong\u003e Before any usage of this, one should test the security aspects of this thoroughly.\n\n## About\n\nThis module provides classes for setting up Kerberos methods over a protocol.\n\nThis contains has three main parts :\n\n\u003cul\u003e\n\u003cli\u003eKDC classes\u003c/li\u003e\n\u003cli\u003eServer class\u003c/li\u003e\n\u003cli\u003eClient class\u003c/li\u003e\n\u003c/ul\u003e\n\nKey Distribution Centre (KDC) classes, which are used in generating initial authentication and Ticket Granting Ticket (TGT), and then tickets for individual servers, which are to be protected by this protocol.\nThe main classes are KerberosAS and KerberosTGS, and KerberosKDC provides an easier-to-use interface over them for the cases when Authentication Service and Ticket Granting Service is to be set up in same server program.\n\u003cstrong\u003eNOTE\u003c/strong\u003e that KerberosKDC class does not provide any extra functionality, and its work can be done by using individual instances of KerberosAS and KerberosTGS. The KerberosKDC class is implemented so that one need not maintain instances of two classes.\n\nThe Server class provides methods which are used on a server that is to be protected by Kerberos.  \n\u003cstrong\u003eNOTE\u003c/strong\u003e that this does not actually set up any server, just contain methods related to kerberos protocol that are used on Server.\n\nThe Client class provides methods which are used by a client which is used to access data on servers protected by Kerberos.\n\u003cstrong\u003eNOTE\u003c/strong\u003e that this does not actually set up any client, just contain methods related to kerberos protocol that are used by client.\n\nThis module provides default classes for basic database and cryptographic requirements,but custom classes can be used as well by making them extend appropriate classes. See API documentation for more information.\n\n## Dependencies\n\nThis Module use \u003ca href='https://github.com/ricmoo/aes-js'\u003eaes-js\u003c/a\u003e module for the default cryptographic needs.\n\nOther than that this has as dev-dependencies of babel for compiling the library to common js, and chai with mocha as testing framework.\n\nThis also uses browserify for generating browser usable script from module, and uglify-js for compacting it.\n\n## Basic Usage Information\n\nThis module can be used as a JS module in node based projects, a Frontend JS Framework, as well as with pure html-css-js websites.\n\nThe \u003ca href='https://github.com/YJDoc2/Kerberos-JS-Module/blob/master/kerberos.js'\u003eKerberos.js\u003c/a\u003e and \u003ca href='https://github.com/YJDoc2/Kerberos-JS-Module/blob/master/kerberos.min.js'\u003eKerberos.min.js\u003c/a\u003e both files include client classes and other required classes used for client side methods, and can be used as stand-alone scripts. These pack the dependency AES-JS inside it, so it does not need to be included separately. On the downside, that makes its size quite big.\n\n\u003cstrong\u003eNote\u003c/strong\u003e that this was developed with idea that made the three components mentioned in about section function independently. Which means it is not compulsory to use KDC,Server and Client of JS module only.The components of this JS module can be used along with those in Python library. The examples repository shows the use in this manner only.\n\nThe API has been decently commented, though not as best it could have been.\nThe detailed API documentation for usage can be found in API md file.\n\nThe lib folder contains the files used for development, and the dist folder contains the files from lib compiled to common-js syntax that can be used with node , using babel.\n\nThe outermost index.js file exports all the components from dist folder in common js.\n\nAll classes and constants exported by the module can be brought in by using :\u003cbr /\u003e\n\u003ccode\u003econst Kerberos = require('path/to/kerberos-js/folder');\u003c/code\u003e\u003cbr /\u003e\nAfter which individual components can be used as :\u003cbr /\u003e\n\u003ccode\u003econst componentClassInstance = Kerberos.componentClassName();\u003c/code\u003e\n\n\u003cstrong\u003eNote\u003c/strong\u003e that some methods of API have a large number of params, upto 6, clearly breaking the max-number-of-params-should-be-3 guideline of good programming.For slightly easier use of these, **all params** of **all** methods follow the following order :  \nrandom number ; request server ; UIDs for user : key ; encryption/decryption data ; tickets ; optional params.\u003cbr /\u003e\nwhichever are present.\n\n## Build Information\n\nRun \u003ccode\u003enpm run build\u003c/code\u003e for building the library.\nThis library uses babel for having the easier import syntax, and then compiling it to common-js.\nThe package json file contains scripts for building the library : \u003ccode\u003ebuild\u003c/code\u003e for compiling the module,then generating kerberos js using browserify and compressing it using uglify-js.\nThen their are scripts that achieve the individual steps in that building process.\n\n## Working/Security\n\nThis uses the AES 256 bit CTR mode by default for all encryptions and decryptions.\nFor security considerations check \u003ca href='https://github.com/YJDoc2/Kerberos-JS-Module/blob/master/security.md'\u003esecurity md\u003c/a\u003e.\n\u003cstrong\u003eNote that developer neither gives any guarantee nor takes any responsibility for the security of this module.\u003c/strong\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjdoc2%2Fkerberos-js-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyjdoc2%2Fkerberos-js-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjdoc2%2Fkerberos-js-module/lists"}