-
Notifications
You must be signed in to change notification settings - Fork 2
SSH agent forwarding #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: denis-coric/ssh-flow
Are you sure you want to change the base?
Changes from 16 commits
51a4a35
f6fb9eb
61b3595
3e0e5c0
4a2b273
0f3d3b8
39be87e
dbef641
9545ac2
24d499c
df603ef
7e5d6d9
59aef6e
ebfff2d
0570c4c
e5da79c
ab0bdbe
b72d222
55d06ab
f6281d6
5e3e13e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,4 +31,5 @@ export const { | |
| updateUser, | ||
| addPublicKey, | ||
| removePublicKey, | ||
| getPublicKeys, | ||
| } = users; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import { AuthorisedRepo } from '../config/generated/config'; | ||
| import { PushQuery, Repo, RepoQuery, Sink, User, UserQuery } from './types'; | ||
| import { PushQuery, Repo, RepoQuery, Sink, User, UserQuery, PublicKeyRecord } from './types'; | ||
| import * as bcrypt from 'bcryptjs'; | ||
| import * as config from '../config'; | ||
| import * as mongo from './mongo'; | ||
|
|
@@ -171,9 +171,11 @@ export const findUserBySSHKey = (sshKey: string): Promise<User | null> => | |
| sink.findUserBySSHKey(sshKey); | ||
| export const getUsers = (query?: Partial<UserQuery>): Promise<User[]> => sink.getUsers(query); | ||
| export const deleteUser = (username: string): Promise<void> => sink.deleteUser(username); | ||
| export const updateUser = (user: Partial<User>): Promise<void> => sink.updateUser(user); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the We could alternatively fix the usages, but it makes the most sense for a DB |
||
| export const addPublicKey = (username: string, publicKey: string): Promise<void> => | ||
| export const updateUser = (user: User): Promise<void> => sink.updateUser(user); | ||
| export const addPublicKey = (username: string, publicKey: PublicKeyRecord): Promise<void> => | ||
| sink.addPublicKey(username, publicKey); | ||
| export const removePublicKey = (username: string, publicKey: string): Promise<void> => | ||
| sink.removePublicKey(username, publicKey); | ||
| export type { PushQuery, Repo, Sink, User } from './types'; | ||
| export const removePublicKey = (username: string, fingerprint: string): Promise<void> => | ||
| sink.removePublicKey(username, fingerprint); | ||
| export const getPublicKeys = (username: string): Promise<PublicKeyRecord[]> => | ||
| sink.getPublicKeys(username); | ||
| export type { PushQuery, Repo, Sink, User, PublicKeyRecord } from './types'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,4 +31,5 @@ export const { | |
| updateUser, | ||
| addPublicKey, | ||
| removePublicKey, | ||
| getPublicKeys, | ||
| } = users; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to keep the CLI and server independent? Since the CLI is already importing a few things from the parent package.
Perhaps we could extract this function to
src/service/routes/utils.tsfor better testing and dealing with potential bugs. 🤔