├── .gitignore
├── opa
├── run.sh
├── test
│ ├── config-example.json
│ ├── user-example.json
│ └── test.sh
└── containerssh
│ ├── data.json
│ ├── auth.rego
│ └── config.rego
├── logging-elk-stack
├── fluentd
│ ├── Dockerfile
│ └── conf
│ │ └── fluent.conf
├── README.md
├── generate_keys.sh
├── config.yaml
├── Dockerfile
└── docker-compose.yaml
├── .github
├── ISSUE_TEMPLATE
│ └── bug_report.md
└── PULL_REQUEST_TEMPLATE.md
├── quick-start
├── config.yaml
├── generate_keys.sh
├── docker-compose.yaml
├── README.md
└── kubernetes.yaml
├── SECURITY.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── README.md
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
--------------------------------------------------------------------------------
/opa/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | opa run -b containerssh/ --server
3 |
--------------------------------------------------------------------------------
/opa/test/config-example.json:
--------------------------------------------------------------------------------
1 | {
2 | "username": "joe"
3 | }
4 |
--------------------------------------------------------------------------------
/opa/test/user-example.json:
--------------------------------------------------------------------------------
1 | {
2 | "username": "joe",
3 | "passwordBase64": "YWJj"
4 | }
5 |
--------------------------------------------------------------------------------
/logging-elk-stack/fluentd/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM fluent/fluentd:v1.12.0-debian-1.0
2 | USER root
3 | RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-document", "--version", "5.0.1"]
4 | USER fluent
--------------------------------------------------------------------------------
/opa/containerssh/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "defaultImage": "busybox",
3 | "users": [
4 | {"name": "joe", "pw": "YWJj", "image": "otherimage"},
5 | {"name": "bob", "pw": "def"}
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/logging-elk-stack/README.md:
--------------------------------------------------------------------------------
1 | # Logging to the ELK stack with Docker and Fluentd
2 |
3 | This is the source code for the [logging guide with Docker, Fluentd and the ELK stack](https://containerssh.io/guides/docker-elk/).
4 |
--------------------------------------------------------------------------------
/opa/containerssh/auth.rego:
--------------------------------------------------------------------------------
1 | package containerssh.auth
2 |
3 | default success = false
4 |
5 | success = true {
6 | u := input.username
7 | p := input.passwordBase64
8 | record := data.users[_]
9 | record.name == u
10 | record.pw == p
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/opa/test/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | curl -s -X POST -d @user-example.json -H 'Content-Type: application/json' localhost:8181/v0/data/containerssh/auth | jq .
3 | curl -s -X POST -d @config-example.json -H 'Content-Type: application/json' localhost:8181/v0/data/containerssh/config | jq .
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Report a problem with an example
4 | title: ''
5 | labels: bug
6 | assignees: janoszen
7 |
8 | ---
9 |
10 | **Which example does this problem concern?**
11 | ...
12 |
13 | **Please describe the problem?**
14 |
--------------------------------------------------------------------------------
/logging-elk-stack/generate_keys.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ssh-keygen -q -N "" -t rsa -b 4096 -f ssh_host_rsa_key
4 | ssh-keygen -q -N "" -t ed25519 -f ssh_host_ed25519_key
5 | ssh-keygen -q -N "" -t ecdsa -f ssh_host_ecdsa_key
6 |
7 | # Public key files are not needed
8 | rm ssh_host_*_key.pub
9 |
--------------------------------------------------------------------------------
/logging-elk-stack/config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | ssh:
3 | hostkeys:
4 | - /var/secrets/ssh_host_rsa_key
5 | - /var/secrets/ssh_host_ed25519_key
6 | - /var/secrets/ssh_host_ecdsa_key
7 | auth:
8 | url: "http://authconfig:8080"
9 | configserver:
10 | url: "http://authconfig:8080/config"
11 | dockerrun:
12 | host: unix:///var/run/docker.sock
13 | log:
14 | level: debug
15 |
--------------------------------------------------------------------------------
/logging-elk-stack/fluentd/conf/fluent.conf:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | port 24224
4 | bind 0.0.0.0
5 |
6 |
7 | @type parser
8 | format json
9 | key_name log
10 | reserve_data true
11 |
12 |
13 | @type elasticsearch
14 | host elasticsearch
15 | port 9200
16 | logstash_format true
17 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Example
3 | about: Adding or fixin an example
4 | title: ''
5 | assignees: janoszen
6 | ---
7 |
8 | ## Please give a brief description of the change
9 |
10 | ...
11 |
12 | ## Are you the owner of the code or do you have permission of the owner?
13 |
14 | ...
15 |
16 | ## The code will be published under the MIT-0 license. Have you read and understood this license?
17 |
18 | ...
19 |
--------------------------------------------------------------------------------
/opa/containerssh/config.rego:
--------------------------------------------------------------------------------
1 | package containerssh.config
2 |
3 | image(user) = i {
4 | record := data.users[_]
5 | record.name == user
6 | i := record.image
7 | } else = data.defaultImage
8 |
9 | config = {
10 | "kubernetes": {
11 | "pod": {
12 | "podSpec": {
13 | "containers": [
14 | {"name": "shell", "image": image(input.username)}
15 | ]
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/logging-elk-stack/Dockerfile:
--------------------------------------------------------------------------------
1 | # This Dockerfile is built as a quick example to deploy ContainerSSH.
2 | # It is intended to be run on a local Docker setup for testing purposes.
3 | FROM containerssh/containerssh:0.4.1
4 | # We are changing the user back to 0 so we can access the Docker socket.
5 | # We don't recommend using this setting in production. Please take a look
6 | # at https://containerssh.io/reference/dockerrun/ for hardened settings.
7 | USER 0
8 |
--------------------------------------------------------------------------------
/quick-start/config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | ssh:
3 | banner: "Welcome to ContainerSSH!\n"
4 | hostkeys:
5 | - /var/secrets/ssh_host_rsa_key
6 | - /var/secrets/ssh_host_ecdsa_key
7 | - /var/secrets/ssh_host_ed25519_key
8 | log:
9 | level: debug
10 | auth:
11 | url: "http://authconfig:8080"
12 | configserver:
13 | url: "http://authconfig:8080/config"
14 | backend: docker
15 | docker:
16 | connection:
17 | host: unix:///var/run/docker.sock
18 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | ContainerSSH is very early in development and does not have a stable release yet. When it becomes stable (1.0) we will follow [Semantic Versioning](https://semver.org/) for support. The support period for each branch is still to be determined.
6 |
7 | ## Reporting a Vulnerability
8 |
9 | If you think you have found a vulnerability please contact us via our [security page](https://containerssh.io/about/security/).
10 |
--------------------------------------------------------------------------------
/quick-start/generate_keys.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ssh-keygen -q -N "" -t rsa -b 4096 -f ssh_host_rsa_key
4 | ssh-keygen -q -N "" -t ed25519 -f ssh_host_ed25519_key
5 | ssh-keygen -q -N "" -t ecdsa -f ssh_host_ecdsa_key
6 |
7 | sed -i "s!@@SSH_HOST_RSA_KEY@@!$(base64 -w0 ssh_host_rsa_key)!g" kubernetes.yaml
8 | sed -i "s!@@SSH_HOST_ED25519_KEY@@!$(base64 -w0 ssh_host_ed25519_key)!g" kubernetes.yaml
9 | sed -i "s!@@SSH_HOST_ECDSA_KEY@@!$(base64 -w0 ssh_host_ecdsa_key)!g" kubernetes.yaml
10 |
11 | # Public key files are not needed
12 | rm ssh_host_*_key.pub
13 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to ContainerSSH
2 |
3 | Welcome! And a big thank you for wanting to contribute!
4 |
5 | Let's get you started. First of all, this project is licensed under the [MIT-0 license](LICENSE.md). This means that the code you submit will be usable for anyone for any purpose free of charge. Please submit code that you personally own or have permission to submit under this license, and only if you are ok with that.
6 |
7 | That's out of the way, let's focus on making your contribution happen. For the coding aspects we recommend reading the [development guide](https://containerssh.io/development/). It runs you through the nitty-gritty details of setting up the development environment.
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | ContainerSSH aims to be a welcoming community for everyone to talk about and develop this open source tool. We kindly ask you to follow these four simple rules:
4 |
5 | 1. Be nice to each other.
6 | 2. Assume good intentions.
7 | 3. Attack the idea not the person.
8 | 4. Please take politics and off-topic discussions elsewhere.
9 |
10 | It sometimes happens that our words don't read like we intend them to, especially online. However, we do not tolerate rude behavior of any kind on our platforms. In such a case our moderators will gently remind the person in question to be kind to each other. On repeated violations we will ask the person in question to leave our community.
11 |
12 | If you witness such behavior, or you are personally attacked please refrain from answering if possible and contact our staff at handshake@containerssh.io.
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://containerssh.io/)
2 |
3 |
4 |
ContainerSSH examples
5 |
6 | This repository contains examples on how to use ContainerSSH in certain scenarios. Feel free to use these to build your own ContainerSSH setup.
7 |
8 |
6 |
7 | **⚠️ Warning:** This setup will let any password authenticate. Only use it for testing.
8 |
9 | ## Step 1: Set up a Dockerized or Kubernetes environment
10 |
11 | To run this quick start please make sure you have a working [Docker environment](https://docs.docker.com/get-docker/) and a working [docker-compose](https://docs.docker.com/compose/).
12 |
13 | Alternatively, you can also set up a Kubernetes cluster. We recommend setting up [Docker Desktop](https://www.docker.com/products/docker-desktop), [k3s](https://k3s.io/), or [Kubernetes in Docker](https://kind.sigs.k8s.io/).
14 |
15 | ## Step 2: Download the sample files
16 |
17 | Please download the contents of the [example directory](https://github.com/ContainerSSH/examples/tree/main/quick-start) from the source code repository.
18 |
19 | ## Step 3: Launch ContainerSSH
20 |
21 | For a Docker environment run `docker-compose up -d` in the downloaded `quick-start` (this) directory.
22 |
23 | For a Kubernetes environment run `kubectl apply -f kubernetes.yaml` in the `quick-start` (this) directory.
24 |
25 | ## Step 4: Logging in
26 |
27 | Run `ssh foo@localhost -p 2222` on the same machine via a new terminal window. This is your test client. You should be able to log in with any password.
28 |
29 | Alternatively you can also try the user `busybox` to land in a Busybox container.
30 |
31 | ## Step 5: Cleaning up
32 |
33 | Once you're done, you can shut down the server using the `docker-compose down`, then remove the images using `docker-compose rm` and remove the guest image by running `docker image rm containerssh/containerssh-guest-imag` for a Docker environment, or `kubectl delete -f kubernetes.yaml` for the Kubernetes environment.
34 |
35 | ## Step 6: Making it productive
36 |
37 | The authentication and configuration server included in the example is a dummy server and lets any password in. To actually use ContainerSSH, you will have to write [your own authentication server](https://containerssh.io/getting-started/authserver/). We recommend reading the [architecture overview](https://containerssh.io/getting-started/architecture/) before proceeding.
38 |
39 | **👉 Tip:** You can pass the `CONTAINERSSH_ALLOW_ALL` environment variable to the demo auth-config server to build a honeypot.
40 |
--------------------------------------------------------------------------------
/quick-start/kubernetes.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # We are creating a new namespace that ContainerSSH will run in.
3 | apiVersion: v1
4 | kind: Namespace
5 | metadata:
6 | name: containerssh
7 | ---
8 | # We are creating a new namespace we can use to launch guest containers. This will be locked down.
9 | apiVersion: v1
10 | kind: Namespace
11 | metadata:
12 | name: containerssh-guests
13 | ---
14 | # Let's apply a network policy for the containerssh-guests namespace so guests can't connect any network resources.
15 | # This might not work if your CNI doesn't support network policies (e.g. Docker Desktop)
16 | apiVersion: networking.k8s.io/v1
17 | kind: NetworkPolicy
18 | metadata:
19 | name: containerssh-guest-policy
20 | namespace: containerssh-guests
21 | spec:
22 | podSelector: {}
23 | policyTypes:
24 | - Ingress
25 | - Egress
26 | ---
27 | # Let's create a ConfigMap that contains the ContainerSSH configuration
28 | apiVersion: v1
29 | kind: ConfigMap
30 | metadata:
31 | name: containerssh-config
32 | namespace: containerssh
33 | data:
34 | config.yaml: |
35 | # Let's log on the debug level so we can see what's going on.
36 | log:
37 | level: debug
38 | ssh:
39 | hostkeys:
40 | # This points to the host key we will create in the next step.
41 | - /etc/containerssh/ssh_host_rsa_key
42 | - /etc/containerssh/ssh_host_ed25519_key
43 | - /etc/containerssh/ssh_host_ecdsa_key
44 | auth:
45 | # The authentication server will be running in the same pod, so we use 127.0.0.1
46 | url: http://127.0.0.1:8080
47 | # We run the guest containers in the same Kubernetes cluster as ContainerSSH is running in
48 | backend: kubernetes
49 | kubernetes:
50 | connection:
51 | host: kubernetes.default.svc
52 | cacertFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
53 | bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
54 | pod:
55 | metadata:
56 | namespace: containerssh-guests
57 | spec:
58 | containers:
59 | - name: shell
60 | image: containerssh/containerssh-guest-image
61 | ## Further options to lock down the execution.
62 | ## See https://containerssh.io/reference/kubernetes/ for mre options
63 | #
64 | # securityContext:
65 | # runAsNonRoot: true
66 | # runAsUser: 1000
67 | # resources:
68 | # limits:
69 | # memory: "128Mi"
70 | # cpu: "500m"
71 | ---
72 | # We create a secret that holds the host key.
73 | # This is hard-coded for the example, for production you'd need to generate
74 | # a new host key with openssl genrsa and then base64-encode it.
75 | apiVersion: v1
76 | kind: Secret
77 | metadata:
78 | name: containerssh-hostkey
79 | namespace: containerssh
80 | data:
81 | ssh_host_rsa_key: |
82 | @@SSH_HOST_RSA_KEY@@
83 | ssh_host_ed25519_key: |
84 | @@SSH_HOST_ED25519_KEY@@
85 | ssh_host_ecdsa_key: |
86 | @@SSH_HOST_ECDSA_KEY@@
87 | ---
88 | # We are creating a new service account that can be used to launch new containers.
89 | apiVersion: v1
90 | kind: ServiceAccount
91 | metadata:
92 | name: containerssh
93 | namespace: containerssh
94 | automountServiceAccountToken: true
95 | ---
96 | # We are creating a new role that will let the service account launch pods in the containerssh-guests namespace.
97 | apiVersion: rbac.authorization.k8s.io/v1
98 | kind: Role
99 | metadata:
100 | name: containerssh
101 | namespace: containerssh-guests
102 | rules:
103 | - apiGroups:
104 | - ""
105 | resources:
106 | - pods
107 | - pods/logs
108 | - pods/exec
109 | verbs:
110 | - '*'
111 | ---
112 | # We are creating a role binding that binds the containerssh service account to the containerssh role.
113 | apiVersion: rbac.authorization.k8s.io/v1
114 | kind: RoleBinding
115 | metadata:
116 | name: containerssh
117 | namespace: containerssh-guests
118 | roleRef:
119 | apiGroup: rbac.authorization.k8s.io
120 | kind: Role
121 | name: containerssh
122 | subjects:
123 | - kind: ServiceAccount
124 | name: containerssh
125 | namespace: containerssh
126 | ---
127 | # Now we are creating a deployment that runs ContainerSSH.
128 | apiVersion: apps/v1
129 | kind: Deployment
130 | metadata:
131 | name: containerssh
132 | namespace: containerssh
133 | labels:
134 | app: containerssh
135 | spec:
136 | replicas: 1
137 | selector:
138 | matchLabels:
139 | app: containerssh
140 | template:
141 | metadata:
142 | labels:
143 | app: containerssh
144 | spec:
145 | # We are using the containerssh service account
146 | serviceAccountName: containerssh
147 | containers:
148 | # Run ContainerSSH
149 | - name: containerssh
150 | image: containerssh/containerssh:0.4
151 | securityContext:
152 | # Read only container
153 | readOnlyRootFilesystem: true
154 | ports:
155 | - containerPort: 2222
156 | volumeMounts:
157 | # Mount the host keys
158 | - name: hostkey
159 | mountPath: /etc/containerssh/ssh_host_rsa_key
160 | subPath: ssh_host_rsa_key
161 | readOnly: true
162 | - name: hostkey
163 | mountPath: /etc/containerssh/ssh_host_ed25519_key
164 | subPath: ssh_host_ed25519_key
165 | readOnly: true
166 | - name: hostkey
167 | mountPath: /etc/containerssh/ssh_host_ecdsa_key
168 | subPath: ssh_host_ecdsa_key
169 | readOnly: true
170 | # Mount the config file
171 | - name: config
172 | mountPath: /etc/containerssh/config.yaml
173 | subPath: config.yaml
174 | readOnly: true
175 | # Run the auth-config test server for authentication
176 | - name: containerssh-authconfig
177 | image: containerssh/containerssh-test-authconfig:0.4
178 | securityContext:
179 | readOnlyRootFilesystem: true
180 | # Don't allow containers running as root (ContainerSSH doesn't need it)
181 | securityContext:
182 | runAsNonRoot: true
183 | volumes:
184 | - name: hostkey
185 | secret:
186 | secretName: containerssh-hostkey
187 | - name: config
188 | configMap:
189 | name: containerssh-config
190 | ---
191 | # Create a service that makes the SSH service public on port 22
192 | apiVersion: v1
193 | kind: Service
194 | metadata:
195 | name: containerssh
196 | namespace: containerssh
197 | spec:
198 | selector:
199 | app: containerssh
200 | ports:
201 | - protocol: TCP
202 | port: 2222
203 | targetPort: 2222
204 | type: LoadBalancer
205 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
--------------------------------------------------------------------------------