Skip to content

Commit 0d10496

Browse files
authored
Merge pull request #49749 from Srivaralakshmi/SBO-FilePermissions
Document a note on file permissions in projected secrets
2 parents b44f6bf + 8f645b0 commit 0d10496

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

applications/connecting_applications_to_services/projecting-binding-data.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ After the backing service exposes the binding data, for a workload to access and
1919
include::modules/sbo-configuration-of-directory-path-to-project-binding-data.adoc[leveloffset=+1]
2020
include::modules/sbo-projecting-the-binding-data.adoc[leveloffset=+1]
2121

22+
[role="_additional-resources"]
23+
[id="additional-resources_projecting-binding-data-sbo"]
2224
== Additional resources
2325
* xref:../../applications/connecting_applications_to_services/exposing-binding-data-from-a-service.adoc#exposing-binding-data-from-a-service[Exposing binding data from a service].
2426
* link:https://redhat-developer.github.io/service-binding-operator/userguide/using-projected-bindings/using-projected-bindings.html[Using the projected binding data in the source code of the application].

modules/sbo-configuration-of-directory-path-to-project-binding-data.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /applications/connecting_applications_to_services/projecting-binding-data.adoc
4+
5+
:_content-type: CONCEPT
16
[id="sbo-configuration-of-directory-path-to-project-binding-data_{context}"]
27
= Configuration of the directory path to project the binding data inside workload container
38

@@ -33,6 +38,13 @@ username = os.getenv("USERNAME")
3338
password = os.getenv("PASSWORD")
3439
----
3540

41+
[WARNING]
42+
====
43+
.For using the binding data directory name to look up the binding data
44+
{servicebinding-title} uses the `ServiceBinding` resource name (`.metadata.name`) as the binding data directory name. The spec also provides a way to override that name through the `.spec.name` field. As a result, there is a chance for binding data name collision if there are multiple `ServiceBinding` resources in the namespace. However, due to the nature of the volume mount in Kubernetes, the binding data directory will contain values from only one of the `Secret` resources.
45+
====
46+
47+
[id="computation-of-the-final-path-for-projecting-the-binding-data-as-files_{context}"]
3648
== Computation of the final path for projecting the binding data as files
3749

3850
The following table summarizes the configuration of how the final path for the binding data projection is computed when files are mounted at a specific directory:
@@ -51,6 +63,11 @@ The following table summarizes the configuration of how the final path for the b
5163

5264
In the previous table, the `<ServiceBinding_ResourceName>` entry specifies the name of the `ServiceBinding` resource that you configure in the `.metadata.name` section of the custom resource (CR).
5365

66+
[NOTE]
67+
====
68+
By default, the projected files get their permissions set to 0644. {servicebinding-title} cannot set specific permissions due to a bug in Kubernetes that causes issues if the service expects specific permissions such as `0600`. As a workaround, you can modify the code of the program or the application that is running inside a workload resource to copy the file to the `/tmp` directory and set the appropriate permissions.
69+
====
70+
5471
To access and consume the binding data within the existing `SERVICE_BINDING_ROOT` environment variable, use the built-in language feature of your programming language of choice that can read environment variables.
5572

5673
.Example: Python client usage

modules/sbo-projecting-the-binding-data.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /applications/connecting_applications_to_services/projecting-binding-data.adoc
4+
15
:_content-type: PROCEDURE
26
[id="sbo-projecting-the-binding-data_{context}"]
37
= Projecting the binding data

0 commit comments

Comments
 (0)