Европейски механизъм за сваляне на имунитет

Post Syndicated from Bozho original https://blog.bozho.net/blog/4098

Днес в записите на Радостин Василев се чува как Христо Иванов бил измислил как да не бъде свалян имунитета на Борисов. Христо Иванов вече отрече да е имало такъв замисъл, но нека обясня детайлите, защото работих по конкретиката на тази идея за ползване на правилата на европейския парламент.

Известно е, че нашата прокуратура е бухалка и не се свени да повдига обвинения по политически причини. Конституцията е дала на народните представители имунитет, за да ги пази в случаи, включително в които с действията си провокират прокуратурата – напр. с гласуване на закони за орязване на всевластието на главния прокурор.

В правилника на Европейския парламент има разписана процедура, по която комисията по правни въпроси (JURI) разглежда в закрити заседания исканията за имунитети на евродепутати, изслушва ги и дава доклад, за да може в пленарна зала да бъде решено дали имунитетът да бъде даден. Комисията може да изисква всички материали по разследването и има обективни критерии за преценка.

Това със сигурност не отнема 6 месеца – искането на Цацаров за имунитета на Елена Йончева е отнело 2 месеца, като единият е бил празничният декември.

Към момента в правилника на нашето Народно събрание няма много подробности за този процес, преценката се прави на база на това, което прокуратурата реши да предостави като информация, и всъщност позволява „тупане на топката“. А това оставя отворена врата за спекулации, вкл. с това кой кого пази и с какви мотиви. Затова обсъждахме въвеждането на по-ясни правила, като европейските.

За да няма бланкетното даване на имунитети или бланкетното отказване на имунитети, а всеки случай да може да бъде преценен обективно. За да изпълним духа на Конституцията. И за да не може с едно гласуване, без да имаме детайли, да бъдем вкарани в нечия игра или в нечий лагер.

Такъв механизъм е особено важен в момент, в който Гешев е обявил война на Народното събрание, защото то планира да му ограничи правомощията.

А конституционната реформа със сигурност ще отнеме по-дълго от всякакъв процес по гледане на имунитет, така че съпоставката между двата процеса никога не е била обект на обсъждане.

Всяка правилна идея може да бъде изкривена до „задкулисие“, когато бъде извадена от контекст и лишена от важни подробности, затова нека не придаваме на едни записи на преразкази твърде голямо значение. И мога да потвърдя, че в Да, България не сме обсъждали пазене на имунитета на когото и да било.

Материалът Европейски механизъм за сваляне на имунитет е публикуван за пръв път на БЛОГодаря.

Introducing the Enhanced Document API for DynamoDB in the AWS SDK for Java 2.x

Post Syndicated from John Viegas original https://aws.amazon.com/blogs/devops/introducing-the-enhanced-document-api-for-dynamodb-in-the-aws-sdk-for-java-2-x/

We are excited to announce that the AWS SDK for Java 2.x now offers the Enhanced Document API for DynamoDB, providing an enhanced way of working with Amazon DynamoDb items.
This post covers using the Enhanced Document API for DynamoDB with the DynamoDB Enhanced Client. By using the Enhanced Document API, you can create an EnhancedDocument instance to represent an item with no fixed schema, and then use the DynamoDB Enhanced Client to read and write to DynamoDB.
Furthermore, unlike the Document APIs of aws-sdk-java 1.x, which provided arguments and return types that were not type-safe, the EnhancedDocument provides strongly-typed APIs for working with documents. This interface simplifies the development process and ensures that the data is correctly typed.

Prerequisites:

Before getting started, ensure you are using an up-to-date version of the AWS Java SDK dependency with all the latest released bug-fixes and features. For Enhanced Document API support, you must use version 2.20.33 or later. See our “Set up an Apache Maven project” guide for details on how to manage the AWS Java SDK dependency in your project.

Add dependency for dynamodb-enhanced in pom.xml.

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb-enhanced</artifactId>
<version>2.20.33</version>
</dependency>

Quick walk-through for using Enhanced Document API to interact with DDB

Step 1 : Create a DynamoDB Enhanced Client

Create an instance of the DynamoDbEnhancedClient class, which provides a high-level interface for Amazon DynamoDB that simplifies working with DynamoDB tables.

DynamoDbEnhancedClient enhancedClient = DynamoDbEnhancedClient.builder()
                                               .dynamoDbClient(DynamoDbClient.create())
                                               .build();

Step 2 : Create a DynamoDbTable resource object with Document table schema

To execute commands against a DynamoDB table using the Enhanced Document API, you must associate the table with your Document table schema to create a DynamoDbTable resource object. The Document table schema builder requires the primary index key and attribute converter providers. Use AttributeConverterProvider.defaultProvider() to convert document attributes of default types. An optional secondary index key can be added to the builder.


DynamoDbTable<EnhancedDocument> documentTable = enhancedClient.table("my_table",
                                              TableSchema.documentSchemaBuilder()
                                                         .addIndexPartitionKey(TableMetadata.primaryIndexName(),"hashKey", AttributeValueType.S)
                                                         .addIndexSortKey(TableMetadata.primaryIndexName(), "sortKey", AttributeValueType.N)
                                                         .attributeConverterProviders(AttributeConverterProvider.defaultProvider())
                                                         .build());
                                                         
// call documentTable.createTable() if "my_table" does not exist in DynamoDB

Step 3 : Write a DynamoDB item using an EnhancedDocument

The EnhancedDocument class has static factory methods along with a builder method to add attributes to a document. The following snippet demonstrates the type safety provided by EnhancedDocument when you construct a document item.

EnhancedDocument simpleDoc = EnhancedDocument.builder()
 .attributeConverterProviders(defaultProvider())
 .putString("hashKey", "sampleHash")
 .putNull("nullKey")
 .putNumber("sortKey", 1.0)
 .putBytes("byte", SdkBytes.fromUtf8String("a"))
 .putBoolean("booleanKey", true)
 .build();
 
documentTable.putItem(simpleDoc);

Step 4 : Read a Dynamo DB item as an EnhancedDocument

Attributes of the Documents retrieved from a DynamoDB table can be accessed with getter methods

EnhancedDocument docGetItem = documentTable.getItem(r -> r.key(k -> k.partitionValue("samppleHash").sortValue(1)));

docGetItem.getString("hashKey");
docGetItem.isNull("nullKey")
docGetItem.getNumber("sortKey").floatValue();
docGetItem.getBytes("byte");
docGetItem.getBoolean("booleanKey"); 

AttributeConverterProviders for accessing document attributes as custom objects

You can provide a custom AttributeConverterProvider instance to an EnhancedDocument to convert document attributes to a specific object type.
These providers can be set on either DocumentTableSchema or EnhancedDocument to read or write attributes as custom objects.

TableSchema.documentSchemaBuilder()
           .attributeConverterProviders(CustomClassConverterProvider.create(), defaultProvider())
           .build();
    
// Insert a custom class instance into an EnhancedDocument as attribute 'customMapOfAttribute'.
EnhancedDocument customAttributeDocument =
EnhancedDocument.builder().put("customMapOfAttribute", customClassInstance, CustomClass.class).build();

// Retrieve attribute 'customMapOfAttribute' as CustomClass object.
CustomClass customClassObject = customAttributeDocument.get("customMapOfAttribute", CustomClass.class);

Convert Documents to JSON and vice-versa

The Enhanced Document API allows you to convert a JSON string to an EnhancedDocument and vice-versa.

// Enhanced document created from JSON string using defaultConverterProviders.
EnhancedDocument documentFromJson = EnhancedDocument.fromJson("{\"key\": \"Value\"}")
                                              
// Converting an EnhancedDocument to JSON string "{\"key\": \"Value\"}"                                                 
String jsonFromDocument = documentFromJson.toJson();

Define a Custom Attribute Converter Provider

Custom attribute converter providers are implementations of AttributeConverterProvider that provide converters for custom classes.
Below is an example for a CustomClassForDocumentAPI which has as a single field stringAttribute of type String and its corresponding AttributeConverterProvider implementation.

public class CustomClassForDocumentAPI {
    private final String stringAttribute;

    public CustomClassForDocumentAPI(Builder builder) {
        this.stringAttribute = builder.stringAttribute;
    }
    public static Builder builder() {
        return new Builder();
    }
    public String stringAttribute() {
        return stringAttribute;
    }
    public static final class Builder {
        private String stringAttribute;
        private Builder() {
        }
        public Builder stringAttribute(String stringAttribute) {
            this.stringAttribute = string;
            return this;
        }
        public CustomClassForDocumentAPI build() {
            return new CustomClassForDocumentAPI(this);
        }
    }
}
import java.util.Map;
import software.amazon.awssdk.enhanced.dynamodb.AttributeConverter;
import software.amazon.awssdk.enhanced.dynamodb.AttributeConverterProvider;
import software.amazon.awssdk.enhanced.dynamodb.EnhancedType;
import software.amazon.awssdk.utils.ImmutableMap;

public class CustomAttributeForDocumentConverterProvider implements AttributeConverterProvider {
    private final Map<EnhancedType<?>, AttributeConverter<?>> converterCache = ImmutableMap.of(
        EnhancedType.of(CustomClassForDocumentAPI.class), new CustomClassForDocumentAttributeConverter());
        // Different types of converters can be added to this map.

    public static CustomAttributeForDocumentConverterProvider create() {
        return new CustomAttributeForDocumentConverterProvider();
    }

    @Override
    public <T> AttributeConverter<T> converterFor(EnhancedType<T> enhancedType) {
        return (AttributeConverter<T>) converterCache.get(enhancedType);
    }
}

A custom attribute converter is an implementation of AttributeConverter that converts a custom classes to and from a map of attribute values, as shown below.

import java.util.LinkedHashMap;
import java.util.Map;
import software.amazon.awssdk.enhanced.dynamodb.AttributeConverter;
import software.amazon.awssdk.enhanced.dynamodb.AttributeValueType;
import software.amazon.awssdk.enhanced.dynamodb.EnhancedType;
import software.amazon.awssdk.enhanced.dynamodb.internal.converter.attribute.EnhancedAttributeValue;
import software.amazon.awssdk.enhanced.dynamodb.internal.converter.attribute.StringAttributeConverter;
import software.amazon.awssdk.services.dynamodb.model.AttributeValue;

public class CustomClassForDocumentAttributeConverter implements AttributeConverter<CustomClassForDocumentAPI> {
    public static CustomClassForDocumentAttributeConverter create() {
        return new CustomClassForDocumentAttributeConverter();
    }
    @Override
    public AttributeValue transformFrom(CustomClassForDocumentAPI input) {
        Map<String, AttributeValue> attributeValueMap = new LinkedHashMap<>();
        if(input.string() != null){
            attributeValueMap.put("stringAttribute", AttributeValue.fromS(input.string()));
        }
        return EnhancedAttributeValue.fromMap(attributeValueMap).toAttributeValue();
    }

    @Override
    public CustomClassForDocumentAPI transformTo(AttributeValue input) {
        Map<String, AttributeValue> customAttr = input.m();
        CustomClassForDocumentAPI.Builder builder = CustomClassForDocumentAPI.builder();
        if (customAttr.get("stringAttribute") != null) {
            builder.stringAttribute(StringAttributeConverter.create().transformTo(customAttr.get("stringAttribute")));
        }
        return builder.build();
    }
    @Override
    public EnhancedType<CustomClassForDocumentAPI> type() {
        return EnhancedType.of(CustomClassForDocumentAPI.class);
    }
    @Override
    public AttributeValueType attributeValueType() {
        return AttributeValueType.M;
    }
}

Attribute Converter Provider for EnhancedDocument Builder

When working outside of a DynamoDB table context, make sure to set the attribute converter providers explicitly on the EnhancedDocument builder. When used within a DynamoDB table context, the table schema’s converter provider will be used automatically for the EnhancedDocument.
The code snippet below shows how to set an AttributeConverterProvider using the EnhancedDocument builder method.

// Enhanced document created from JSON string using custom AttributeConverterProvider.
EnhancedDocument documentFromJson = EnhancedDocument.builder()
                                                    .attributeConverterProviders(CustomClassConverterProvider.create())
                                                    .json("{\"key\": \"Values\"}")
                                                    .build();
                                                    
CustomClassForDocumentAPI customClass = documentFromJson.get("key", CustomClassForDocumentAPI.class)

Conclusion

In this blog post we showed you how to set up and begin using the Enhanced Document API with the DynamoDB Enhanced Client and standalone with the EnhancedDocument class. The enhanced client is open-source and resides in the same repository as the AWS SDK for Java 2.0.
We hope you’ll find this new feature useful. You can always share your feedback on our GitHub issues page.

What’s Up, Home? – Monitor your mobile data usage

Post Syndicated from Janne Pikkarainen original https://blog.zabbix.com/whats-up-home-monitor-your-mobile-data-usage/25856/

Can you monitor your mobile data usage with Zabbix? Of course, you can! By day, I am a Lead Site Reliability Engineer in a global cyber security company Forcepoint. By night, I monitor my home with Zabbix & Grafana Labs and do some weird experiments with them. Welcome to my blog about this project.

As it is Easter (the original blog post was published two months ago), this entry is a bit short but as I was remoting into my home systems over VPN and my phone, I got this blog post idea. 

When on the go, I tend to stay connected to my home network over VPN. Or rather, an iOS Shortcut pretty much runs OpenVPN home profile for me whenever I exit my home. 

My Zabbix collects statistics from my home router over SNMP, and as usual, the data includes per-port traffic statistics. VPN clients are shown as tunnel interfaces so Zabbix LLD picks them up nicely.

So, as a result, I get to see how much traffic my phone consumes whenever I’m using a mobile VPN. Here are seven-day example screenshots from ZBX Viewer mobile app. 

VPN connection bits sent.

VPN connection bits received

So, from this data I could get all the statistics I need. And, using my ElastiFlow setup, could likely see to where my phone has been connecting to most.

This post was originally published on the author’s page.

The post What’s Up, Home? – Monitor your mobile data usage appeared first on Zabbix Blog.

[$] Mitigating vmap lock contention

Post Syndicated from original https://lwn.net/Articles/932396/

The “vmap area” is a range of kernel address space used when the kernel
needs to virtually map a range of memory; among other things, memory
allocations obtained from vmalloc() and loadable modules are
placed there. At the 2023 Linux Storage,
Filesystem, Memory-Management and BPF Summit
, Uladzislau Rezki,
presenting remotely,
explained a performance problem related to the vmap area and discussed
possible solutions.

[$] Optimizing single-owner memory

Post Syndicated from original https://lwn.net/Articles/932391/

The kernel’s memory-management subsystem is optimized for the sharing of
resources to the greatest extent possible. But, as Pasha Tatashin pointed
out during a memory-management session at the 2023 Linux Storage, Filesystem,
Memory-Management and BPF Summit
, a lot of memory has a single owner
and will never be shared. He presented some ideas for optimizing the
management of that memory to a somewhat skeptical crowd.

Security updates for Friday

Post Syndicated from original https://lwn.net/Articles/933071/

Security updates have been issued by Debian (sniproxy), Fedora (c-ares), Oracle (apr-util, curl, emacs, git, go-toolset and golang, go-toolset:ol8, gssntlmssp, libreswan, mysql:8.0, thunderbird, and webkit2gtk3), Red Hat (go-toolset-1.19 and go-toolset-1.19-golang and go-toolset:rhel8), Slackware (ntfs), SUSE (rmt-server), and Ubuntu (linux-raspi, linux-raspi-5.4 and python-django).

Author Spotlight: Vittorio Denti, Machine Learning Engineer at Amazon

Post Syndicated from Elise Chahine original https://aws.amazon.com/blogs/architecture/author-spotlight-vittorio-denti-machine-learning-engineer-at-amazon/

The Author Spotlight series pulls back the curtain on some of AWS and Amazon’s most prolific authors. Read on to find out more about our very own Vittorio Denti’s journey, in his own words!


I’m Vittorio, and I work as a Machine Learning Engineer at Amazon. My journey in the engineering world began when I started studying Computer Engineering at Politecnico di Milano during my bachelor’s degree. It continued during the master’s degree, when I started focusing on data and artificial intelligence. During my master’s, I spent one year in Stockholm, at the KTH Royal Institute of Technology, where I studied machine learning and deep learning. I joined Amazon Web Services (AWS) in 2020 through Tech U, a graduate program for technical roles in AWS, where I started working in the area of cloud architecture. During my time in AWS, I have had the opportunity to become familiar with software architectures, the AWS cloud, and develop system design skills for distributed systems.

At AWS, I was able to grow from a technical standpoint by learning new technologies and architectural patterns for distributed systems. I’ve also had the opportunity to grow my personal perspective. I found amazing mentors: people with years of experience that were always available to talk with me, compare ideas, and explain complex topics. When I was studying at university, I developed a vertical set of technical skills, which I’m still using every day at work, and I’m now able to boost those skills by taking advantage of the pragmatism and mindset acquired through mentoring.

With AWS, I was mainly working on cloud architectures for customers but also on internal projects and blog posts. I had the opportunity to support customers in designing their machine learning architectures for model training and for serving real-time traffic, as well as working on different challenges like query optimization for databases or asynchronous communication patterns for microservices. This breadth of scenarios was fundamental to build horizontal skills outside of the machine learning domain and learning how to navigate unexplored areas.

At the end of 2022, I moved from AWS to Amazon, where I started working as a Machine Learning Engineer on Amazon Sponsored Display, a self-service solution from Amazon Ads. In this new role, I work as an engineer developing and productionizing some of the machine learning algorithms used in advertising. I really like this role because there are many opportunities to explore and build. Also, working on a product and understanding the long-term impact of architectural and engineering decisions is extremely valuable to grow as a professional.

By working at Amazon’s scale, there are many factors to consider before coming up with a solution. All of this is an amazing opportunity to learn more, experiment, and satisfy my curiosity. As you have understood by now, I always like facing new challenges, pushing myself out of the comfort zone, and being able to learn about new areas and technologies.

Some of my favorite moments so far are related to public and internal conferences that I have attended both with AWS and Amazon. In 2021, I had the opportunity to go to re:Invent 2021 in Las Vegas—the annual AWS cloud conference. In 2023, I went to Madrid for DevCon, the internal engineering conference for Amazon employees. These experiences have been extremely valuable to discover more about new technical content as well as for networking and learning from peers.

Vittorio (on the right) with his colleague Darren (on the left) at re:Invent 2021. They attended the conference and supported the AWS Game Day.

Vittorio (on the right) with his colleague Darren (on the left) at re:Invent 2021, supporting AWS Game Day

What’s on my mind

Machine learning is a growing area: it’s still fairly new and there is a lot of innovation happening. Engineers work to find the “optimal” way for running machine learning in production and balance all the different trade-offs that consistently arise. Machine learning engineering faces the complexities of software engineering and adds extra challenges deriving from working with data and models. It’s not only about developing software! We also have to work to explore, monitor, and (in some cases) build datasets and training models, plus productionize them. There are two main entities to consider (datasets and models) that do not usually appear in software engineering, and this brings extra complexity.

Some stimulating challenges are about increasing model performance without impacting latency, working with unbalanced datasets, and detecting model or data drift automatically and solving for it. This is just a set of fascinating engineering areas to explore for machine learning. While for some of these problems, the industry already has some answers or directions, the question is: how can we do this at scale and create mature and reliable solutions? In the next few years I would like to answer these questions. For instance, car manufacturers have well-established supply chains and mature manufacturing processes. To the best of my knowledge, we don’t have something comparable in the area of machine learning engineering… yet! We have a set of excellent artisans working at scale, good processes to ensure quality (like code reviews and testing), but the risk of failures or inefficiencies is still high because of the stochastic nature of the domain.

Other topics I’m passionate about are machine learning science and software architecture. I like reading research papers, understanding the latest innovations, and learn not only from their contributions, but also from the processes that the authors followed to achieve those results. There are many opportunities to transfer knowledge from other domains to machine learning engineering, and I’m always inquiring to learn more about science and engineering to run the latest innovations in production.

Favorite blog posts and resources

Design a data mesh with event streaming for real-time recommendations on AWS

Data architectures were mainly designed around technologies rather than business domains in the past. This changed in 2019, when Zhamak Dehghani introduced the data mesh. Data mesh is an application of the Domain-Driven-Design (DDD) principles to data architectures: data is organized into data domains, and the data is the product that the team owns and offers for consumption.

Designing a data architecture for working with machine learning at scale requires careful thought. You may have different data sources, consumers, and data coming from different areas of the organization. Also, your organization may grow and evolve throughout time, so you may have some domains coming up and others disappearing. In 2022, I published an AWS Big Data blog on designing a data mesh architecture with event streaming for machine learning.

In the blog, we design a data mesh with event streaming for a scenario that requires real-time music recommendations on AWS. Because ML applications may have multiple types of input data, we propose a solution that works both for data at rest as well as real-time streaming.

The complete data mesh with event streaming architecture uses two different data planes: one is dedicated for sharing data at rest (blue); the other one is for data in motion (red). Check the original blog to see how it was built step-by-step.

The complete data mesh with event-streaming architecture uses two different data planes: one is dedicated for sharing data at rest (blue), the other one is for data in motion (red)

The Let’s Architect! series on the Architecture Blog

Let’s Architect! is an editorial initiative that publishes a bi-weekly post on a specific topic since January 2022. Some of the most recent topics include event-driven architectures, microservices, data mesh and machine learning. We gather four or five different AWS content pieces that provide a perspective on why that content is relevant. Content can be an AWS blog post, a whitepaper, any hands-on workshop with architectural patterns, or a video. We focus on architectural content that can be valuable for software architects as well as software engineers willing to learn more about system design and distributed systems.

This is not only a way to learn and stay familiar with different technical areas but also to contribute and share resources with the community. The initiative has had a strong influence, and we now have customers and even many of our colleagues waiting for the upcoming posts. I have been working on this initiative with Luca Mezzalira, Zamira Jaupaj, Federica Ciuffo and Laura Hyatt, and with the support of the AWS Architecture Blog.

The Let's Architect! series

The Let’s Architect! series

Amazon Builder’s Library

One of most inspiring resources to learn from is the Amazon Builder’s Library. Its mission is to share with customers our experience of building secure and highly available services, and successful durable businesses, at Amazon and AWS.

I think it’s extremely valuable because we can learn directly from the Amazon’s experience of running distributed systems at scale. It’s not only about the content itself or how they solved a specific challenge, but also about learning how they were able to formalize a problem and the journey that they followed to achieve the solution. Also, if you wonder how some AWS services are designed under the hood… you can learn about typical patterns used to implement them by navigating through the resources in the library.

What you'll find on the Amazon Builder's Library

What you’ll find on the Amazon Builder’s Library

How Oxy uses hooks for maximum extensibility

Post Syndicated from Will Bartlett original http://blog.cloudflare.com/oxy-extensibility/

How Oxy uses hooks for maximum extensibility

How Oxy uses hooks for maximum extensibility

We recently introduced Oxy, our Rust framework for building proxies. Through a YAML file, Oxy allows applications to easily configure listeners (e.g. IP, MASQUE, HTTP/1), telemetry, and much more. However, when it comes to application logic, a programming language is often a better tool for the job. That’s why in this post we’re introducing Oxy’s rich dependency injection capabilities for programmatically modifying all aspects of a proxy.

The idea of extending proxies with scripting is well established: we've had great past success with Lua in our OpenResty/NGINX deployments and there are numerous web frameworks (e.g. Express) with middleware patterns. While Oxy is geared towards the development of forward proxies, they all share the model of a pre-existing request pipeline with a mechanism for integrating custom application logic. However, the use of Rust greatly helps developer productivity when compared to embedded scripting languages. Having confidence in the types and mutability of objects being passed to and returned from callbacks is wonderful.

Oxy exports a series of hook traits that “hook” into the lifecycle of a connection, not just a request. Oxy applications need to control almost every layer of the OSI model: how packets are received and sent, what tunneling protocols they could be using, what HTTP version they are using (if any), and even how DNS resolution is performed. With these hooks you can extend Oxy in any way possible in a safe and performant way.

First, let's take a look from the perspective of an Oxy application developer, and then we can discuss the implementation of the framework and some of the interesting design decisions we made.

Adding functionality with hooks

Oxy’s dependency injection is a barebones version of what Java or C# developers might be accustomed to. Applications simply implement the start method and return a struct with their hook implementations:

async fn start(
    _settings: ServerSettings<(), ()>,
    _parent_state: Metadata,
) -> anyhow::Result<Hooks<Self>> {
    Ok(Hooks {
        ..Default::default()
    })
}

We can define a simple callback, EgressHook::handle_connection, that will forward all connections to the upstream requested by the client. Oxy calls this function before attempting to make an upstream connection.

#[async_trait]
impl<Ext> EgressHook<Ext> for MyEgressHook
where
    Ext: OxyExt,
{
    async fn handle_connection(
        &self,
        upstream_addr: SocketAddr,
        _egress_ctx: EgressConnectionContext<Ext>,
    ) -> ProxyResult<EgressDecision> {
        Ok(EgressDecision::ExternalDirect(upstream_addr))
    }
}

async fn start(
    _settings: ServerSettings<(), ()>,
    _parent_state: Metadata,
) -> anyhow::Result<Hooks<Self>> {
    Ok(Hooks {
        egress: Some(Arc::new(MyEgressHook)),
        ..Default::default()
    })
}

Oxy simply proxies the connection, but we might want to consider restricting which upstream IPs our clients are allowed to connect to. The implementation above allows everything, but maybe we have internal services that we wish to prevent proxy users from accessing.

#[async_trait]
impl<Ext> EgressHook<Ext> for MyEgressHook
where
    Ext: OxyExt,
{
    async fn handle_connection(
        &self,
        upstream_addr: SocketAddr,
        _egress_ctx: EgressConnectionContext<Ext>,
    ) -> ProxyResult<EgressDecision> {
        if self.private_cidrs.find(upstream_addr).is_some() {
            return Ok(EgressDecision::Block);
        }

        Ok(EgressDecision::ExternalDirect(upstream_addr))
    }
}

This blocking strategy is crude. Sometimes it’s useful to allow certain clients to connect to internal services – a Prometheus scraper is a good example. To authorize these connections, we’ll implement a simple Pre-Shared Key (PSK) authorization scheme – if the client sends the header Proxy-Authorization: Preshared oxy-is-a-proxy, then we’ll let them connect to private addresses via the proxy.

To do this, we need to attach some state to the connection as it passes through Oxy. Client headers only exist in the HTTP CONNECT phase, but we need access to the PSK during the egress phase. With Oxy, this can be done by leveraging its Opaque Extensions to attach arbitrary (yet fully typed) context data to a connection. Oxy initializes the data and passes it to each hook. We can mutate this data when we read headers from the client, and read it later during egress.

How Oxy uses hooks for maximum extensibility

#[derive(Default)]
struct AuthorizationResult {
    can_access_private_cidrs: Arc<AtomicBool>,
}

#[async_trait]
impl<Ext> HttpRequestHook<Ext> for MyHttpHook
where
    Ext: OxyExt<IngressConnectionContext = AuthorizationResult>,
{
    async fn handle_proxy_connect_request(
        self: Arc<Self>,
        connect_req_head: &Parts,
        req_ctx: RequestContext<Ext>,
    ) -> ConnectDirective {
        const PSK_HEADER: &str = "Preshared oxy-is-a-proxy";

        // Grab the authorization header and update 
        // the ingress_ctx if the preshared key matches.
        if let Some(authorization_header) = 
          connect_req_head.headers.get("Proxy-Authorization") {
            if authorization_header.to_str().unwrap() == PSK_HEADER {
                req_ctx
                    .ingress_ctx()
                    .ext()
                    .can_access_private_cidrs
                    .store(true, Ordering::SeqCst);
            }
        }

        ConnectDirective::Allow
    }
}

From here, any hook in the pipeline can access this data. For our purposes, we can just update our existing handle_connection callback:

#[async_trait]
impl<Ext> EgressHook<Ext> for MyEgressHook
where
    Ext: OxyExt<IngressConnectionContext = AuthorizationResult>,
{
    async fn handle_connection(
        &self,
        upstream_addr: SocketAddr,
        egress_ctx: EgressConnectionContext<Ext>,
    ) -> ProxyResult<EgressDecision> {
        if self.private_cidrs.find(upstream_addr).is_some() {
            if !egress_ctx
                .ingress_ctx()
                .ext()
                .can_access_private_cidrs
                .load(Ordering::SeqCst)
            {
                return Ok(EgressDecision::Block);
            }
        }

        Ok(EgressDecision::ExternalDirect(upstream_addr))
    }
}

This is a somewhat contrived example, but in practice hooks and their extension types allow Oxy apps to fully customize all aspects of proxied traffic.

A real world example would be implementing the RFC 9209 next-hop Proxy-Status header. This involves setting a header containing the IP address we connected to on behalf of the client. We can do this with two pre-existing callbacks and a little bit of state: first we save the upstream passed to EgressHook::handle_connection_established and then read the value in the HttpRequestHook:handle_proxy_connect_response in order to set the header on the CONNECT response.

How Oxy uses hooks for maximum extensibility

#[derive(Default)]
struct ConnectProxyConnectionContext {
    upstream_addr: OnceCell<SocketAddr>,
}

#[async_trait]
impl<Ext> EgressHook<Ext> for MyEgressHook
where
    Ext: OxyExt<IngressConnectionContext = ConnectProxyConnectionContext>,
{
    fn handle_connection_established(
        &self,
        upstream_addr: SocketAddr,
        egress_ctx: EgressConnectionContext<Ext>,
    ) {
        egress_ctx
            .ingress_ctx()
            .ext()
            .upstream_addr
            .set(upstream_addr);
    }
}

#[async_trait]
impl<Ext> HttpRequestHook<Ext> for MyHttpRequestHook
where
    Ext: OxyExt<IngressConnectionContext = ConnectProxyConnectionContext>,
{
    async fn handle_proxy_connect_response(
        self: Arc<Self>,
        mut res: Response<OxyBody>,
        req_ctx: RequestContext<Ext>,
    ) -> ProxyConnectResponseHandlingOutcome {
        let ingress = req_ctx.ingress_ctx();
        let ingress_ext = ingress.ext();

        if let Some(upstream_addr) = ingress_ext.upstream_addr.get() {
            res.headers_mut().insert(
                "Proxy-Status",
                HeaderValue::from_str(&format!("next-hop=\"{upstream_addr}\"")).unwrap(),
            );
        }

        res.into()
    }
}

These examples only consider a few of the hooks along the HTTP CONNECT pipeline, but many real Oxy applications don’t even have L7 ingress! We will talk about the abundance of hooks later, but for now let’s look at their implementation.

Hook implementation

Oxy exists to be used by multiple teams, all with different needs and requirements. It needs a pragmatic solution to extensibility that allows one team to be productive without incurring too much of a cost on others. Hooks and their Opaque Extensions provide effectively limitless customization to applications via a clean, strongly typed interface.

The implementation of hooks within Oxy is relatively simple – throughout the code there are invocations of hook callbacks:

if let Some(ref hook) = self.hook {
    hook.handle_connection_established(upstream_addr, &egress_ctx)
        .await;
}

If a user-provided hook exists, we call it. Some hooks are more like events (e.g. handle_connection_established), and others have return values (e.g. handle_connection) which are matched on by Oxy for control flow. If a callback isn’t implemented, the default trait implementation is used. If a hook isn’t implemented at all, Oxy’s business logic just executes its default functionality. These levels of default behavior enable the minimal example we started with earlier.

While hooks solve the problem of integrating app logic into the framework, there is invariably a need to pass custom state around as we demonstrated in our PSK example. Oxy manages this custom state, passing it to hook invocations. As it is generic over the type defined by the application, this is where things get more interesting.

Generics and opaque types

Every team that works with Oxy has unique business needs, so it is important that one team’s changes don’t cause a cascade of refactoring for the others. Given that these context fields are of a user-defined type, you might expect heavy usage of generics. With Oxy we took a different approach: a generic interface is presented to application developers, but within the framework the type is erased. Keeping generics out of the internal code means adding new extension types to the framework is painless.

Our implementation relies on the Any trait. The framework treats the data as an opaque blob, but when it traverses the public API, the wrapped Any object is downcast into the concrete type defined by the user. The public API layer enforces that the user type must implement Default, which allows Oxy to be wholly responsible for creating and managing instances of the type. Mutations are then done by users of the framework through interior mutability, usually with atomics and locks.

Crates like reqwest_middleware, tracing and http have a similar extension mechanism.

There’s a hook for that

As you might have gathered, Oxy cares a lot about the productivity of Oxy app developers. The plethora of injection points lets users quickly add features and functionality without worrying about “irrelevant” proxy logic. Sane defaults help balance customizability with complexity.

Only a subset of callbacks will be invoked for a given packet: applications operating purely at L3 will see different hook callbacks fired compared to one operating at L7. This again is customizable – if desired, Oxy’s design allows connections to be upgraded (or downgraded)  which would cause a different set of callbacks to be invoked.

How Oxy uses hooks for maximum extensibility

The ingress phase is where the hooks controlling the upgrading of L3 and decapsulation of specific L4 protocols reside. For our L3 IP Tunnel, Oxy has powerful callbacks like IpFlowHook::handle_flow which allow applications to drop, upgrade or redirect flows. IpFlowHook::handle_packet gives that same level of control at the packet level – even allowing us to modify the byte array as it passes through.

Let’s consider the H2 Proxy Protocol example in the above diagram. After Oxy has accepted the Proxy Protocol connection it fires ProxyProtocolConnectionHook::handle_connection with the parsed header, allowing applications to handle any TLVs of interest. Hook like these are common – Oxy handles the heavy lifting and then passes the application some useful information.

From here, L4 connections are funneled through the IngressHook which contains a callback we saw in our initial example: IngressHook::handle_connection. This works as you might expect, allowing applications to control whether to Allow or Block a connection as it ingresses. There is a counterpart: IngressHook::handle_connection_close, which when called gives applications insight into ingress connection statistics like loss, retransmissions, bytes transferred, etc.

Next up is the transformation phase, where we start to see some of our more powerful hooks. Oxy invokes TunnelHook::should_intercept_https, passing the SNI along with the usual connection context. This enables applications to easily configure HTTPS interception based on hostname and any custom context data (e.g. ACLs). By default, Oxy effectively splices the ingress and egress sockets, but if applications wish to have complete control over the tunneling, that is possible with TunnelHook::get_app_tunnel_pipeline, where applications are simply provided the two sockets and can implement whatever interception capabilities they wish.

Of particular interest to those wishing to implement L7 firewalls, the HttpRequestHookPipeline has two very powerful callbacks:  handle_request and handle_response. Both of these offer a similar high level interface for streaming rewrites or scanning of HTTP bodies.

The EgressHook has the most callbacks, including some of the most powerful ones. For situations where hostnames are provided, DNS resolution must occur. At its simplest, Oxy allows applications to specify the nameservers used in resolution. If more control is required, Oxy provides a callback – EgressHook::handle_upstream_ips – which gives applications an opportunity to mutate the resolved IP addresses before Oxy connects. If applications want absolute control, they can turn to EgressHook::dns_resolve_override which is invoked with a hostname and expects a Vec<IpAddr> to be returned.

Much like the IngressHook, there is an EgressHook::handle_connection hook, but rather than just Allow or Block, applications can instruct Oxy to egress their connection externally, internally within Cloudflare, or even downgrade to IP packets. While it’s often best to defer to the framework for connection establishment, Oxy again offers complete control to those who want it with a few override callbacks, e.g. tcp_connect_override, udp_connect_override. This functionality is mainly leveraged by our egress service, but available to all Oxy applications if they need it.

Lastly, one of the newest additions, the AppLifecycleHook. Hopefully this sees orders of magnitude fewer invocations than the rest. The AppLifecycleHook::state_for_restart callback is invoked by Oxy during a graceful shutdown. Applications are then given the opportunity to serialize their state which will be passed to the child process. Graceful restarts are a little more nuanced, but this hook cleanly solves the problem of passing application state between releases of the application.

Right now we have around 64 public facing hooks and we keep adding more. The above diagram is (largely) accurate at time of writing but if a team needs a hook and there can be a sensible default for it, then it might as well be added. One of the primary drivers of the hook architecture for Oxy is that different teams can work on and implement the hooks that they need. Business logic is kept outside Oxy, so teams can readily leverage each other's work.

We would be remiss not to mention the issue of discoverability. For most cases, it isn’t an issue, however application developers may find when developing certain features that a more holistic understanding is necessary. This inevitably means looking into the Oxy source to fully understand when and where certain hook callbacks will be invoked. Reasoning about the order callbacks will be invoked is even thornier. Many of the hooks alter control flow significantly, so there’s always some risk that a change in Oxy could mean a change in the semantics of the applications built on top of it. To solve this, we’re experimenting with different ways to record hook execution orders when running integration tests, maybe through a proc-macro or compiler tooling.

Conclusion

In this post we’ve just scratched the surface of what’s possible with hooks in Oxy. In our example we saw a glimpse of their power: just two simple hooks and a few lines of code, and we have a forward proxy with built-in metrics, tracing, graceful restarts and much, much more.

Oxy’s extensibility with hooks is “only” dependency injection, but we’ve found this to be an extremely powerful way to build proxies. It’s dependency injection at all layers of the networking stack, from IP packets and tunnels all the way up to proxied UDP streams over QUIC. The shared core with hooks approach has been a terrific way to build a proxy framework. Teams add generic code to the framework, such as new Opaque Extensions in specific code paths, and then use those injection points to implement the logic for everything from iCloud Private Relay to Cloudflare Zero Trust. The generic capabilities are there for all teams to use, and there’s very little to no cost if you decide not to use them. We can’t wait to see what the future holds and for Oxy’s further adoption within Cloudflare.

Expeditionary Cyberspace Operations

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2023/05/expeditionary-cyberspace-operations.html

Cyberspace operations now officially has a physical dimension, meaning that the United States has official military doctrine about cyberattacks that also involve an actual human gaining physical access to a piece of computing infrastructure.

A revised version of Joint Publication 3-12 Cyberspace Operations—published in December 2022 and while unclassified, is only available to those with DoD common access cards, according to a Joint Staff spokesperson—officially provides a definition for “expeditionary cyberspace operations,” which are “[c]yberspace operations that require the deployment of cyberspace forces within the physical domains.”

[…]

“Developing access to targets in or through cyberspace follows a process that can often take significant time. In some cases, remote access is not possible or preferable, and close proximity may be required, using expeditionary [cyber operations],” the joint publication states. “Such operations are key to addressing the challenge of closed networks and other systems that are virtually isolated. Expeditionary CO are often more regionally and tactically focused and can include units of the CMF or special operations forces … If direct access to the target is unavailable or undesired, sometimes a similar or partial effect can be created by indirect access using a related target that has higher-order effects on the desired target.”

[…]

“Allowing them to support [combatant commands] in this way permits faster adaptation to rapidly changing needs and allows threats that initially manifest only in one [area of responsibility] to be mitigated globally in near real time. Likewise, while synchronizing CO missions related to achieving [combatant commander] objectives, some cyberspace capabilities that support this activity may need to be forward-deployed; used in multiple AORs simultaneously; or, for speed in time-critical situations, made available via reachback,” it states. “This might involve augmentation or deployment of cyberspace capabilities to forces already forward or require expeditionary CO by deployment of a fully equipped team of personnel and capabilities.”

Дръж Гешев, за да кротува Борисов

Post Syndicated from Емилия Милчева original https://www.toest.bg/druzh-geshev-za-da-krotuva-borisov/

Дръж Гешев, за да кротува Борисов

In every life we have some trouble,
When you worry you make it double,
Don't worry, be happy.*

Главен прокурор да захапе ръката, която го е хранила? Ето че се случва. Политиката и прокуратурата са така оплетени, че ставащото предизвиква верижна реакция и в двете системи. Колкото по-дълго се задържи Иван Гешев на поста, толкова по-дълго ще кротува лидерът на ГЕРБ Бойко Борисов.

Падат трупчетата, крепили делата, поставени върху тях като инвестиция, застраховка до живот и шантаж едновременно. Гуша за гуша се хващат „братя по оръжие“ – главният прокурор Гешев и неговият заместник и шеф на Националната следствена служба Борислав Сарафов, главният прокурор и членове на Висшия съдебен съвет, бранили го с позиции, гласуване и мълчание. Разломът в прокуратурата не е реформа, а „кланово противопоставяне“, по думите на адвоката към Антикорупционния фонд и бивш прокурор Андрей Янкулов.

Единият клан, както виждаме, остава верен на „ръката“, другият – на главния прокурор, и започват взаимно да се нападат с проверки, компромати и искания за освобождаване.

В политиката се сключва не просто пакт за взаимопомощ между политически сили, които са си омразни, а се договаря правителство, в което едната (засега) има един-единствен министър, и то еврокомисар, напуснал поста си. Всичко това – за да „случи“ еврозоната и Шенген, както обясни бившият премиер и съпредседател на „Продължаваме промяната“ Кирил Петков, наричайки във видео Мария Габриел „ключ, за да бъде този модел конструиран“, а извън Facebook – „мост, който да съедини несъвместими формации“.

Договорката е Габриел да застъпи като министър-председател след девет месеца, през които ще управлява Николай Денков (ПП). Критиците наричат ротацията „предателство“, защитниците – „разум“ и „спасение“, но всички са предпазливи в очакванията си, изтощени от над две години безплодни опити за стабилно редовно правителство и загуба на доверие в политическото и парламентаризма.

Инструментът „Радостин Василев“

Онзи enter, с който плашеха главния прокурор обаче, бе натиснат, изглежда, за Радостин Василев, миналогодишния отцепник от „Има такъв народ“, който заедно с петима други от ИТН се опита да набави необходимите гласове, за да има парламентарно мнозинство кабинетът на Кирил Петков. Наскоро прокуратурата поиска имунитета му заради разследване, че тогава се е опитал да сплаши своя колежка от парламентарната група, за да я принуди да напусне Народното събрание.

Сега Василев, бивш министър на спорта и два пъти начело на листите на ПП, отново напуска – този път групата на ПП–ДБ. Пак е в ролята на непримирим боец срещу грабителите и мафията, на рицаря на неподправената с компромиси промяна. Ще прави гражданско сдружение и размахва уличаващи лидерите на ПП записи с миризма на партийна кухня. Кирил Петков свика медиите преди разкритията на Василев, за да заяви, че записите са монтаж, че това е дело на „дълбоката държава“, активно мероприятие, за да няма кабинет. Пред bTV и Даниел Митов от ГЕРБ–СДС коментира действията на Василев като „част от динамиката, която цели разклащането на политическата среда“.

Най-вероятно Борисов ще прости. Той прости собствения си арест (или поне така твърди), ще извини и непремерените приказки по негов, на Габриел и сие адрес. Което не значи, че ще ги забрави. Първият му коментар беше, че няма да му повлияят относно съставянето на правителство, а целта им е тъкмо такава – да го осуети. „Аз само знам, че това обслужва много, много различни интереси, които не искат България да се стабилизира“, заяви той в петък, 26 май. В същия ден Василев разпространи запис от заседание на Националния съвет на ПП, на което се чуват реплики как „това правителство ще съществува, докато Борисов се страхува от Гешев и президента“ (Асен Василев) и как „Борисов ще се изпере през Мария Габриел“ (Кирил Петков).

Но за компенсация може да се наложи „Продължаваме промяната“ да удовлетвори желанията на ГЕРБ за няколко министри в правителството на Денков и/или в предстоящото обновяване и попълване на близо 70 места в 17 регулаторни и контролни органа.

Падат имунитети

Борисов и Гешев се борят за едно и също – о-це-ля-ва-не и амнистия. За да опази кожата си, лидерът на ГЕРБ отстъпи дотам, че се отказа да състави правителство, макар партията да спечели изборите, и реши да подкрепи кабинет на ПП. Главният прокурор е избрал друга тактика – настъпва, вместо да отстъпва, и не спира да повтаря, че ще изкара мандата си.

Иван Гешев преглежда арсенала, който държи срещу политиците – делата на трупчета, и едно от тях, сложено там преди девет години, e пуснато в употреба за втори път. Поискан е имунитетът на депутата от ГЕРБ и бивш енергиен министър Делян Добрев заради разследването за умишлена безстопанственост по казуса с АЕЦ „Белене“, по което е обвиняем.

Обвинението срещу него е, че не е оказал достатъчен контрол върху работата на Българския енергиен холдинг като министър през 2012 г., така че да прекрати навреме всякакви дейности по втората АЕЦ. Основание да спрат са решенията на правителството и на парламента от март 2012 г. Те слагат край на проекта, но въпреки това са били платени над 4,5 млн. eвро на „Парсънс E&C Юръп Лимитед“ – архитект-инженер по програмата за строителство на „Белене“. ГЕРБ го раздават принципно, обявявайки, че нито Добрев, нито някой друг от ГЕРБ–СДС ще се отказва от депутатския си имунитет, ако му бъде поискан от Гешев.

Мнозина очакват същото да се случи и с лидера на ГЕРБ Бойко Борисов, добре обрисуван в записа и пресконференцията на главния прокурор като Поръчителя на отстраняването му (от институцията). Депутати и симпатизанти на ГЕРБ отидоха да подкрепят Борисов на разпитите в двете прокуратури, където беше тази седмица. В Софийската градска прокуратура го разпитваха по делото, известно като „Барселонагейт“ – за нашумялата къща в каталунската столица, където живееше българката Борислава Йовчева и дъщеря ѝ, с които свързват Борисов.

А във Върховната касационна прокуратура разговорът е бил за писмото от неизвестен подател, пратено на Гешев. Онова, което започва с цитат от Мечо Пух, обрамчен в кавички, и метафори като „гола скала“, на която стои сам главният прокурор, а там духа вятър. Пълно с баналности като от треторазреден екшън, където, вместо да натиснат спусъците, мъжагите си говорят как е дошъл „краят на приказката“.

А, да, има и лукче – символ на непоискани услуги от главния прокурор, което е невъзможно за вярване. Но поне показва, че авторът на писмото е живял в соца, защото лукчетата бяха известни тогава. Пурата и уискито са слабости и на Борисов, и на Гешев. Срещу главния прокурор дори започна проверка от Столичната регионална здравна инспекция заради репортаж, в който той пали пура по време на дистанционно участие в заседание на ВСС. В Съдебната палата, където е кабинетът му, е забранено тютюнопушенето на закрито.

Дълга война

Войната между политиците и главния прокурор Иван Гешев едва ли ще приключи толкова бързо, колкото смятат в парламента, където депутатите не просто бързат, а галопират с промените в Наказателно-процесуалния кодекс и Закона за съдебната власт. По утвърден парламентарен маниер един закон се променя чрез заключителни разпоредби в друг. Тази седмица те бяха приети от Правната комисия и на второ четене, което означава, че до 30 май парламентът може да гласува окончателно механизма за разследване на главния прокурор и да намали на 13 гласа мнозинството във ВСС, необходимо за смяната му (сега е 17).

С изненадващо предложение ГЕРБ прекрои промените, внесени от служебното правителство, което доведе до напрежение в Правната комисия. За скандални промени за съдебната власт предупреди най-напред бившият председател на ВКС Лозан Панов, също и съдия Красимир Мазгалов, който написа:

Зад маската на контрол и разследване на главния прокурор ГЕРБ и ДПС прокараха изменения, които ликвидират независимостта на съда – председателите на ВКС и ВАС да могат да се избират с просто мнозинство от 13 гласа в пленума, което означава 11 от прокурорската колегия и само двама от съдийската, които могат да бъдат и адвокати, избрани от парламента. Мечтата на българския политик – пълен контрол върху съда.

Следващата седмица, когато измененията бъдат внесени в пленарната зала, ще стане ясно дали предложението ще бъде прието и ще го преглътнат ли ПП–ДБ, за които съдебната реформа е част от партийния им бранд. Защото това съвсем не е съдебна реформа, а оформяне на ново статукво – старото не върши работа, понеже е компрометирано.

ГЕРБ отново се опитват силово да наложат договорени неизвестно къде и с кого предложения. А ВСС започна процедурата, която може да доведе до освобождаването на Иван Гешев от поста главен прокурор. Той е обвинен за сериозно уронване на престижа на съдебната власт. Приеме ли парламентът законовите промени идната седмица, обвинител №1 може да се окаже и разследван.

Но дали пък точно сега да не бъде запазен още известно време на поста? Иначе как ще изтече мръсната вода.

* Цитатът е от песента на Боби Макферин Don't Worry, Be Happy.

На второ четене: „Живеещия“

Post Syndicated from Стефан Иванов original https://www.toest.bg/na-vtoro-chetene-jiveeshtiya/

„Живеещия“ от Анна Старобинец

превод от руски Емилия Попова, изд. „Жар“, 2021

На второ четене: „Живеещия“

Започнах отново да пиша този текст на 24 май, след като първоначалната му версия заедно с бележките ми към него изчезнаха безследно. Това се оказа по някакъв начин в съзвучие и със самата книга –

писана преди дузина години, но болезнено актуална, безпощадна и мощна дистопия,

в която свободата и любовта също са изчезнали. В съзвучие е и с живота на руската писателка. Тя изчезва от Русия, защото недвусмислено е заявила позициите си по отношение на потискането на демокрацията в страната, на завоевателната война, която Русия води, и не е съгласна да приеме ролята на кукла в ръцете на кукловод. В момента живее в Грузия.

Проверих и за първи път съм чел и писал за Старобинец и за нейния „Пубертет“ преди седемнайсет години в „Една седмица в София“, също безследно изчезнало издание.

Изрових си текста:

Дебютът на 26-годишната рускиня е още топъл, издаден е през 2005 година. Едноименната повест е шизофренична психеделия, издържана в стила на „Преображението“ на Кафка – малко дете има ужасно странна патологична близост с хиляди мравки. Във всеки един от другите разкази историята също е за човек или робот, в който има нещо сбъркано, бъгнато, повредено. Жена губи съпруга си и го замества с идентичен робот, но след това нещата хич не са прости и прекрасни. Мъж заживява алтернативен живот, след като заспива във влак за Москва, ама май не всичко е само сън или е нещо друго. Журналист се събужда мъртъв една сутрин, отива в редакцията и продължава да мъртвее хиляди години. Книгата е стряскаща и плашеща, но също и доста тъжна: мрачно минусово четиво за края на зимата на нашата самота.

И в романа „Живеещия“ руската писателка отново пише за мравки и термити, но в друг контекст –

този път книгата е плътен и гъст роман за технологичния възход на човечеството и катастрофалния му и обезчовечаващ крах.

Видима е близостта с братя Стругацки, Урсула Ле Гуин, Оруел, Хъксли и Уилям Гибсън, но без да е прекалена или дразнеща.

Прозаичният свят на Старобинец е нейно лично оригинално творение и е плашещ и ужасяващо смешен както с голямата си панорамна картина, така и в детайлите. Отнема едва няколко страници да разбереш къде си – в чист, подреден и предвидим свят, контролиран от алгоритми; в живот, прекарван най-вече във виртуална реалност (сбогом, слава богу, Metaverse), принудително свързване, промиване на мозъка и безусловен тоталитаризъм; в общество на категоричен контрол и постоянно наблюдение, където властва погнуса и отвращение от реалността и от истинското докосване.

Разбира се, това е бил единственият възможен сценарий, за да може населението на планетата да оцелее след войни, кризи и пандемии. За да съществуваш в сигурен свят – трябва да се откажеш или да те откажат от определени права. Проблемът е, че

светът започва подозрително да прилича на болезнен затвор без изход. „Живеещия“ е името на тази цивилизация.

На второ четене: „Живеещия“

Стълбовете на такава глобална диктатура са упованието и прилагането на смирение, отговорност и дълг, които се преливат в удоволствие, стабилност и безсмъртие. А честият и натрапчив поздрав е „смърт няма“, защото клонирането е всекидневие. Няма хора, които вече да не са живели. Броят на населението е точен и неизменен. Физическата смърт се нарича „пауза“, често е принудителна и преди нея се отива на гише, където клиентът бива успокояван, че всичко ще бъде наред. Както често се случва с лозунгите и думите на властта, те значат точно обратното, а стълбовете нямат капацитета да удържат ситуацията. Робърт Шекли и неговата „Корпорация „Безсмъртие“ e наистина оптимистично четиво в сравнение с „Живеещия“.

Въобразяването на различни и все по-прекрасни нови светове е възможност да се мисли какво би могло да е бъдещето.

Наистина е повече от възможно да има репресивни йерархии и ограничаване на правата. Наистина думите правят неща, ако не само са изречени, а и приведени в брутално действие. Наистина съпротивата често попада в ситуация като в „Приказка за стълбата“ и забравя срещу какво точно се е борила. И като в история на Филип К. Дик (или във филм по негово произведение) в един момент ще е възможно да се объркаш кое е реално, кое виртуално и кой всъщност си.

Естествено, ражда се дете, което никога не е живяло преди и не е клонинг. Казва се Зеро и в него е инвестирана надежда за промяна. Той изпитва забравени и забранени чувства, като самота, гняв и тъга. Те са в полето на патологията, защото носят желание за прекрояване на ситуацията. Затова са табу.

Писането на Старобинец дава друга перспектива. Кара те да разбиеш черупката на навика и да се изненадаш, че може да действаш и мислиш по различен начин. Възбужда любопитството, както светлата ивица под една врата през нощта, която, въпреки че е страшно, можеш да открехнеш – и го правиш. Зад вратата на Старобинец има

сбъднали се конспирации, зловещи властови игри, козметични реформи, чудовищен макиавелизъм и манипулация, лъжи и измами. Романът е безмилостен и безпощаден.

Самата авторка казва, че авторите на дистопии искат само едно нещо – да пеят като канарчета във въглищни мини и така да предупреждават за опасности, но ако може, да не умират, докато го правят.

Това писане, което не спестява най-страшната възможна истина, е доказателство, че

литературата може да действа като противоотрова на пропагандата.

А писането в жанр дава и неимоверна свобода и размах. Да пишеш в лесно разпознаваема за читателя структура и да я преобръщаш, пародираш и иронизираш е достойнство за романа още от „Дон Кихот“ насам. Но за разлика от много постмодерни романи, тук болката, която книгата излъчва, не е наужким. Дълбока и сериозна е. Самонадеяността на човека, който за пореден път иска да бъде бог, е описана прецизно и шеметно. И все пак има надежда, че може и да ни се размине.

Животът и действителността в епохата на тяхната техническа възпроизводимост, които са представени в романа, обезнадеждават. И това е добре,

защото е ясно по какъв начин никой не иска да живее.

След всяка хубава страшна приказка човек става по-смел. Смелост, която не изчезва безследно. И е повече от нужна.


Активните дарители на „Тоест“ получават постоянна отстъпка в размер на 20% от коричната цена на всички заглавия от каталога на „ЖАР – Жанет Аргирова“, както и на няколко други български издателства в рамките на партньорската програма Читателски клуб „Тоест“. За повече информация прочетете на toest.bg/club.

Никой от нас не чете единствено най-новите книги. Тогава защо само за тях се пише? „На второ четене“ е рубрика, в която отваряме списъците с книги, публикувани преди поне година, четем ги и препоръчваме любимите си от тях. Рубриката е част от партньорската програма Читателски клуб „Тоест“. Изборът на заглавия обаче е единствено на авторите – Стефан Иванов и Севда Семер, които биха ви препоръчали тези книги и ако имаше как веднъж на две седмици да се разходите с тях в книжарницата.

Нека да съм по-щастлив

Post Syndicated from Тоест original https://www.toest.bg/neka-da-sum-po-shtastliv/

Нека да съм по-щастлив

Нека да съм по-щастлив – тя това иска.
Като в звездна лятна нощ жмичка.
Чепка грозде. Топка на точки. Не друго.
Само трябва да кимна послушно.
Може би така ще ти отива повече – казва.
Така, с раирана риза? Дали да откажа?
Какво да отговоря? Повече, несъмнено! –
казвам като крадец, хванат да свива
пакетче масло в магазина. А тя
сега изглежда така, сякаш е на опело.
Масло, масло! Какво иска от мене? Или не?
По-добре правителството да кълне!
Безумния свят, глух и сляп за чуждата болка!…
Нека да съм по-щастлив – това измолва.

1997


Петер Кантор (Будапеща, 1949–2021) е унгарски поет и преводач от английски и руски. Удостоен е с наградата „Атила Йожеф“ (1994) и Лавровия венец на Унгария (2007). Стиховете му са превеждани на множество езици. Поезията му се определя като „диалогична лирика“ (Ласло Дарваши), доколкото в поетиката си води задочен разговор с читателя.

Мартин Христов (Видин, 1966) е преводач от унгарски език, пресътворил на български творби на Ищван Бибо, Шандор Мараи, Геза Чат, Миклош Месьой, Дьорд Петри, Атила Бартиш и др. Основател и управител на издателство „Ерго“.


Според Екатерина Йосифова „четящият стихотворение сутрин… добре понася другите часове“ от деня. Убедени, че поезията държи умовете ни будни, а сърцата – отворени, в края на всеки месец ви предлагаме по едно стихотворение. Защото и в най-смутни времена доброто стихотворение е добра новина.

The collective thoughts of the interwebz