You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/credential/static/query.go

44 lines
1.0 KiB

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
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 = ?;
`
)