Compare commits

...

6 Commits

Author SHA1 Message Date
6a001a214b create troubleshoot heading 2024-02-16 10:33:50 -05:00
9fe2021d9f docs: cover ansible forking error 2024-01-10 22:33:38 +00:00
9e2bd31833 Merge pull request #1298 from Infisical/daniel/csharp-docs
(Docs): .NET SDK documentation & updates existing SDK docs
2024-01-10 16:28:40 -05:00
4a153e5658 Merge pull request #1295 from akhilmhdh/fix/sec-interpolation-undefined
fix(secret-reference): fixed undefined if value not found
2024-01-10 09:59:09 -05:00
7324822be5 fix(secret-reference): fixed undefined if value not found 2024-01-10 11:45:46 +05:30
766f301aea patch agent config by env 2024-01-09 14:30:29 -05:00
3 changed files with 35 additions and 13 deletions

View File

@ -579,7 +579,9 @@ export const getSecretsHelper = async ({
event: "secrets pulled", event: "secrets pulled",
distinctId: await TelemetryService.getDistinctId({ authData }), distinctId: await TelemetryService.getDistinctId({ authData }),
properties: { properties: {
numberOfSecrets: shouldRecordK8Event ? approximateForNoneCapturedEvents : secrets.length, numberOfSecrets: shouldRecordK8Event
? approximateForNoneCapturedEvents
: secrets.length,
environment, environment,
workspaceId, workspaceId,
folderId, folderId,
@ -614,7 +616,6 @@ export const getSecretHelper = async ({
include_imports = true, include_imports = true,
version version
}: GetSecretParams) => { }: GetSecretParams) => {
const secretBlindIndex = await generateSecretBlindIndexHelper({ const secretBlindIndex = await generateSecretBlindIndexHelper({
secretName, secretName,
workspaceId: new Types.ObjectId(workspaceId) workspaceId: new Types.ObjectId(workspaceId)
@ -685,7 +686,13 @@ export const getSecretHelper = async ({
if (!secret && include_imports) { if (!secret && include_imports) {
// if still no secret found search in imported secret and retreive // if still no secret found search in imported secret and retreive
secret = await getAnImportedSecret(secretName, workspaceId.toString(), environment, folderId, version); secret = await getAnImportedSecret(
secretName,
workspaceId.toString(),
environment,
folderId,
version
);
} }
if (!secret) throw SecretNotFoundError(); if (!secret) throw SecretNotFoundError();
@ -1180,11 +1187,12 @@ const recursivelyExpandSecret = async (
const secRefKey = entities[entities.length - 1]; const secRefKey = entities[entities.length - 1];
const val = await fetchCrossEnv(secRefEnv, secRefPath, secRefKey); const val = await fetchCrossEnv(secRefEnv, secRefPath, secRefKey);
if (val !== undefined) {
interpolatedValue = interpolatedValue.replaceAll(interpolationSyntax, val); interpolatedValue = interpolatedValue.replaceAll(interpolationSyntax, val);
} }
} }
} }
}
expandedSec[key] = interpolatedValue; expandedSec[key] = interpolatedValue;
return interpolatedValue; return interpolatedValue;
}; };

View File

@ -498,7 +498,7 @@ var agentCmd = &cobra.Command{
agentConfigInBase64 := os.Getenv("INFISICAL_AGENT_CONFIG_BASE64") agentConfigInBase64 := os.Getenv("INFISICAL_AGENT_CONFIG_BASE64")
if configPath != "" { if agentConfigInBase64 == "" {
data, err := ioutil.ReadFile(configPath) data, err := ioutil.ReadFile(configPath)
if err != nil { if err != nil {
if !FileExists(configPath) { if !FileExists(configPath) {
@ -506,7 +506,6 @@ var agentCmd = &cobra.Command{
return return
} }
} }
agentConfigInBytes = data agentConfigInBytes = data
} }

View File

@ -5,6 +5,21 @@ description: "How to use Infisical for secret management in Ansible"
The documentation for using Infisical to manage secrets in Ansible is currently available [here](https://galaxy.ansible.com/ui/repo/published/infisical/vault/). The documentation for using Infisical to manage secrets in Ansible is currently available [here](https://galaxy.ansible.com/ui/repo/published/infisical/vault/).
<Info>
Have any questions? Join Infisical's [community Slack](https://infisical.com/slack) for quick support. ## Troubleshoot
</Info>
<Accordion title="I'm getting a error related to objc[72832]: +[__NSCFConstantString initialize]">
If you get this Python error when you running the lookup plugin:-
```
objc[72832]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
Fatal Python error: Aborted
```
You will need to add this to your shell environment or ansible wrapper script:-
```
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```
</Accordion>