Composer asks only for password with private repository - authentication

When I use a private repository like below in my composer.json
"repositories": [
{
"url": "ssh://repo.com/porject",
"type": "git"
}
],
Composer install/update doesn't ask me for my username, it gets the name of the current user of my computer and uses it automatically. It prompts me only for a password.
Any idea how to set it correctly and how I can store the auth once typed in?

Try to config access via SSH keys or specify your desired username like below. For more information see the Composer docs.
{
"repositories": [
{
"type": "composer",
"url": "ssh2.sftp://example.org",
"options": {
"ssh2": {
"username": "composer",
"pubkey_file": "/home/composer/.ssh/id_rsa.pub",
"privkey_file": "/home/composer/.ssh/id_rsa"
}
}
}
]
}

Related

Can you set an Application's Client Secret using a kickstart file? FusionAuth

I am using a kickstart.json file to setup FusionAuth in developer environments. Everything is automated except I still need to manually go and get the client secret from the fusion auth instance.
Is there anyway I can predefine the client secret in the kickstart file so I can pre-configure it in my app?
you should absolutely be able to set the client secret from kickstart.json. Any API call should work from within Kickstart.
https://fusionauth.io/docs/v1/tech/apis/applications#create-an-application indicates you can POST an application including the client secret.
So a kickstart file like this should work:
{
"variables": {
"defaultTenantId": "30663132-6464-6665-3032-326466613934"
},
"apiKeys": [
{
"key": "mykey",
"description": "API key"
}
],
"requests": [
{
"method": "POST",
"url": "/api/application/85a03867-dccf-4882-adde-1a79aeec50df",
"body": {
"application": {
"name": "Pied Piper",
"roles": [
{
"name": "dev"
},
{
"name": "ceo"
},
{
"name": "intern"
}
],
"oauthConfiguration" : {
"clientSecret": "shhh-your-desired-secret"
}
}
}
}
]
}
I haven't tested that, but don't see any reason why it would not work. (Note that 1.37, the most recent version, has an issue with kickstart as documented here: https://github.com/FusionAuth/fusionauth-issues/issues/1816 but that should be fixed soon.)
If this doesn't work for you, please share the error message and a scrubbed kickstart file.

Chaostoolkit istio extension hangs when playing experiment

I'm trying to use the chaos toolkit istio extension, my problem is as follows:
I have a experiment.json file which contains a single probe to retrieve a virtual service. The file looks similar to the following:
{
"version": "1.0.0",
"title": "test",
"description": "N/A",
"tags": []
"secrets": {
"istio": {
"KUBERNETES_CONTEXT": {
"type": "env",
"key": "KUBERNETES_CONTEXT"
}
}
},
"method": [
{
"type": "probe",
"name": get_virtual_service:,
"provider": {
"type": "python",
"module": "chaosistio.fault.probes",
"func": "get_virtual_service",
"arguments": {
"virtual_service_name": "test"
"ns": "test-ns"
}
}
}
}
I have set KUBERNETES_CONTEXT and http/https proxy as env vars. My authorisation is using $HOME/.kube/config.
When playing the experiment it validates the file fine and tries to perform the action but becomes stuck and just hangs until it times out.
The error I see in the logs is a HTTPSConnectionPool error (failed to establish a new connection, operation timed out).
Am I missing any settings? All help appreciated.

Azure SQL Password not meet complexity when coming from keyvault but not when coming from variable

I'm trying to create an Azure SQL Server in Azure with json ARM.
In my json, when I put a password into a variable, the installation is ok.
When I get the same password from a keyvault, it doesn't meet the complexity policy.
My template is valid but the error message appear when creating sql ressource
Password validation failed. The password does not meet policy requirements because it is not complex enough.
The password I use is:
P#ssw0rd01isCompleX
I think I have configured the json properly, it doesn't work.
I have removed the call to the keyvault in the json parameter to let Visual Studio create it for me...same result.
I have try different password.
I'm working with Visual Studio, so I have removed the call to the keyvault to let Visual Studio add it for me....same result
The keyvault is set to Enable Access to Azure Resource Manager for Template.
The output of the deploiement show me blank value for the password, maybe it's normal, maybe it's the symptom....
17:51:46 - Name Type Value
17:51:46 - ===============
17:51:46 - environmentName String dev
17:51:46 - adminlogin String adminlogin
17:51:46 - apv-eun-dev-sql SecureString
17:51:46 - utcValue String 2019-05-16 T15:51:40 +00:00
Do you have an idea about the cause of this ?
json file:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"EnvironmentName": {
"type": "string",
"allowedValues": [
"prod",
"pprd",
"uat",
"dev"
]
},
"adminlogin": {
"type": "string"
},
"apv-eun-dev-sql": {
"type": "securestring"
},
"utcValue": {
"type": "string",
"defaultValue": "[utcNow('yyyy-MM-dd THH:mm:ss zzzz')]"
}
},
"variables": {
},
"resources": [
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"name": "[concat('apv-eun-', parameters('EnvironmentName'),'-sql-001')]",
"properties": {
"administratorLogin": "parameters('adminlogin')",
"administratorLoginPassword": "parameters('apv-eun-dev-sql')",
"version": "12.0"
},
"tags": { "ONEData": "Rules" }
}
],
"outputs": {}
}
json parameters file:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"EnvironmentName": {
"value": "dev"
},
"adminlogin": {
"value": "adminlogin"
},
"apv-eun-dev-sql": {
"reference": {
"keyVault": {
"id": "/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.KeyVault/vaults/apv-eun-dev-akv-001"
},
"secretName": "apv-eun-dev-sql"
}
}
}
}
Am not sure but it seems to be a syntax problem.
In your json file, you have :
"administratorLogin": "parameters('adminlogin')",
"administratorLoginPassword": "parameters('apv-eun-dev-sql')"
While it should be :
"administratorLogin": "[parameters('adminlogin')]",
"administratorLoginPassword": "[parameters('apv-eun-dev-sql')]"
Sources :
https://github.com/rjmax/ArmExamples/blob/master/keyvaultexamples/KeyVaultUse.parameters.json
https://github.com/rjmax/ArmExamples/blob/master/keyvaultexamples/KeyVaultUse.json
https://learn.microsoft.com/fr-fr/azure/azure-resource-manager/resource-manager-keyvault-parameter

Create env fails when using a daemonset to create processes in Kubernetes

I want to deploy a software in to nodes with daemonset, but it is not a docker app. I created a daemonset json like this :
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "uniagent"
},
"annotations": {
"scheduler.alpha.kubernetes.io/tolerations": "[{\"key\":\"beta.k8s.io/accepted-app\",\"operator\":\"Exists\", \"effect\":\"NoSchedule\"}]"
},
"enable": true
},
"spec": {
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"processes": [
{
"name": "foundation",
"package": "xxxxx",
"resources": {
"limits": {
"cpu": "100m",
"memory": "1Gi"
}
},
"lifecyclePlan": {
"kind": "ProcessLifecycle",
"namespace": "engb",
"name": "app-plc"
},
"env": [
{
"name": "SECRET_USERNAME",
"valueFrom": {
"secretKeyRef": {
"name": "key-secret",
"key": "uniagentuser"
}
}
},
{
"name": "SECRET_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "key-secret",
"key": "uniagenthash"
}
}
}
]
},
when the app deploy succeeds, the env variables do not exist at all.
What should I do to solve this problem?
Thanks
Daemon Sets have to be docker containers. You can't have non-containerized programs run as Daemon Sets. https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ Kubernetes only launches containers.
Also in your YAML manifest file, I see a "processes" key and I have reason to believe it's not a valid manifest file, so I doubt you deployed it successfully.
You have not pasted the "full" YAML file, but I'm guessing the "template" key at the beginning is the spec.template key of the file.
Run kubectl explain daemonset.spec.template.spec and you'll see that there is no "processes" field.

composer / satis svn repository http basic authentication

I am trying to create a composer package repository for my company using satis.
My svn repositories are acessed via http (apache svn).
I am trying to add this to my config.json of satis
{
"name": "packages",
"homepage": "http://packages.example.org",
"repositories": [
{ "type": "svn",
"url": "myrepourl"
}
],
"require-all": true
}
THe problem is that I cant authenticate in the repository:
Repository could not be processed, svn: OPTIONS of authorization failed. basic authentication rejected.
How can I pass the username/password to satis?.
Thank you
According to composer documentation, you have to put your user key files or your certificate in your project, not in the satis configuration :
Using SSH :
{
"repositories": [
{
"type": "composer",
"url": "ssh2.sftp://example.org",
"options": {
"ssh2": {
"username": "composer",
"pubkey_file": "/home/composer/.ssh/id_rsa.pub",
"privkey_file": "/home/composer/.ssh/id_rsa"
}
}
}
]
}
Using Certificate :
{
"repositories": [
{
"type": "composer",
"url": "https://example.org",
"options": {
"ssl": {
"cert_file": "/home/composer/.ssl/composer.pem",
}
}
}
]
}