Files
threshold/internal/credential/static/query.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.0 KiB
Go
Raw Normal View History

2023-02-02 17:15:17 -08:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
2022-11-16 17:17:28 -06:00
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 = ?;
`
)