| 1 |
--- |
| 2 |
title: "Security" |
| 3 |
linkTitle: "Security" |
| 4 |
weight: 10 |
| 5 |
--- |
| 6 |
|
| 7 |
<!-- |
| 8 |
|
| 9 |
Licensed to the Apache Software Foundation (ASF) under one |
| 10 |
or more contributor license agreements. See the NOTICE file |
| 11 |
distributed with this work for additional information |
| 12 |
regarding copyright ownership. The ASF licenses this file |
| 13 |
to you under the Apache License, Version 2.0 (the |
| 14 |
"License"); you may not use this file except in compliance |
| 15 |
with the License. You may obtain a copy of the License at |
| 16 |
|
| 17 |
https://www.apache.org/licenses/LICENSE-2.0 |
| 18 |
|
| 19 |
Unless required by applicable law or agreed to in writing, |
| 20 |
software distributed under the License is distributed on an |
| 21 |
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 22 |
KIND, either express or implied. See the License for the |
| 23 |
specific language governing permissions and limitations |
| 24 |
under the License. |
| 25 |
|
| 26 |
--> |
| 27 |
|
| 28 |
Security Policy |
| 29 |
=============== |
| 30 |
|
| 31 |
Apache Avro project shares the same security policy as |
| 32 |
the [Apache Software Foundation](https://www.apache.org/security/). |
| 33 |
|
| 34 |
|
| 35 |
Security Model |
| 36 |
============== |
| 37 |
|
| 38 |
The Avro library implementations are designed to read and write any data conforming |
| 39 |
to a schema. Transport is outside the scope of the Avro library: applications using |
| 40 |
Avro should be surrounded by security measures that prevent attackers from writing |
| 41 |
random data and otherwise interfering with the consumers of schemas. |
| 42 |
|
| 43 |
Although the Avro library will not read or write data except as directed to by |
| 44 |
invoking it, avoiding leaking data into a side channel like log files is a non-goal |
| 45 |
security-wise for Avro. This means, for example, that you will need to catch and |
| 46 |
handle exceptions instead of simply writing them to a log file. |
| 47 |
|
| 48 |
In some cases, like schema parsing, type conversions and based on explicit schema |
| 49 |
properties, Avro can execute code provided by the environment. Avro has opt-in |
| 50 |
mechanisms for code that is eligible for execution. Applications using Avro should |
| 51 |
have a secured supply chain, ensuring code registered to be executed is safe. |
| 52 |
|
| 53 |
This supply chain also includes the schemas being used: if they are user provided, |
| 54 |
additional validation is strongly advised. Such validation can use the parsed schema, |
| 55 |
as schema parsing itself is safe: the parser allows SPIs, but is not otherwise |
| 56 |
configurable. |
| 57 |
|
| 58 |
|
| 59 |
Summary |
| 60 |
------- |
| 61 |
|
| 62 |
In short, using Avro is safe, provided applications: |
| 63 |
|
| 64 |
* are surrounded by security measures that prevent attackers from writing random |
| 65 |
data and otherwise interfering with the consumers of schemas |
| 66 |
* avoid leaking data by, for example, catching and handling exceptions |
| 67 |
* have a secured supply chain, ensuring code registered to be executed is safe |
| 68 |
* if schemas are user provided, validate the parsed schema before use |