-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathquery.go
40 lines (37 loc) · 981 Bytes
/
query.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package static
const (
credStaticUsernamePasswordRewrapQuery = `
select distinct
userpass.public_id,
userpass.password_encrypted,
userpass.key_id
from credential_static_username_password_credential userpass
inner join credential_static_store store
on store.public_id = userpass.store_id
where store.project_id = ?
and userpass.key_id = ?;
`
credStaticSshPrivKeyRewrapQuery = `
select distinct
ssh.public_id,
ssh.private_key_encrypted,
ssh.private_key_passphrase_encrypted,
ssh.key_id
from credential_static_ssh_private_key_credential ssh
inner join credential_static_store store
on store.public_id = ssh.store_id
where store.project_id = ?
and ssh.key_id = ?;
`
credStaticJsonRewrapQuery = `
select distinct
json.public_id,
json.object_encrypted,
json.key_id
from credential_static_json_credential json
inner join credential_static_store store
on store.public_id = json.store_id
where store.project_id = ?
and json.key_id = ?;
`
)