Security updates for Wednesday

Post Syndicated from corbet original https://lwn.net/Articles/959325/

Security updates have been issued by Debian (jinja2, openjdk-11, ruby-httparty, and xorg-server), Fedora (ansible-core and mingw-jasper), Gentoo (GOCR, Ruby, and sudo), Oracle (gstreamer-plugins-bad-free, java-17-openjdk, java-21-openjdk, python-cryptography, and xorg-x11-server), Red Hat (kernel, kernel-rt, kpatch-patch, LibRaw, python-pillow, and python-pip), Slackware (mozilla), SUSE (python-Pillow, rear118a, and redis7), and Ubuntu (libapache-session-ldap-perl and pycryptodome).

Introducing Foundations – our open source Rust service foundation library

Post Syndicated from Ivan Nikulin http://blog.cloudflare.com/author/ivan-nikulin/ original https://blog.cloudflare.com/introducing-foundations-our-open-source-rust-service-foundation-library


In this blog post, we’re excited to present Foundations, our foundational library for Rust services, now released as open source on GitHub. Foundations is a foundational Rust library, designed to help scale programs for distributed, production-grade systems. It enables engineers to concentrate on the core business logic of their services, rather than the intricacies of production operation setups.

Originally developed as part of our Oxy proxy framework, Foundations has evolved to serve a wider range of applications. For those interested in exploring its technical capabilities, we recommend consulting the library’s API documentation. Additionally, this post will cover the motivations behind Foundations’ creation and provide a concise summary of its key features. Stay with us to learn more about how Foundations can support your Rust projects.

What is Foundations?

In software development, seemingly minor tasks can become complex when scaled up. This complexity is particularly evident when comparing the deployment of services on server hardware globally to running a program on a personal laptop.

The key question is: what fundamentally changes when transitioning from a simple laptop-based prototype to a full-fledged service in a production environment? Through our experience in developing numerous services, we’ve identified several critical differences:

  • Observability: locally, developers have access to various tools for monitoring and debugging. However, these tools are not as accessible or practical when dealing with thousands of software instances running on remote servers.
  • Configuration: local prototypes often use basic, sometimes hardcoded, configurations. This approach is impractical in production, where changes require a more flexible and dynamic configuration system. Hardcoded settings are cumbersome, and command-line options, while common, don’t always suit complex hierarchical configurations or align with the “Configuration as Code” paradigm.
  • Security: services in production face a myriad of security challenges, exposed to diverse threats from external sources. Basic security hardening becomes a necessity.

Addressing these distinctions, Foundations emerges as a comprehensive library, offering solutions to these challenges. Derived from our Oxy proxy framework, Foundations brings the tried-and-tested functionality of Oxy to a broader range of Rust-based applications at Cloudflare.

Foundations was developed with these guiding principles:

  • High modularity: recognizing that many services predate Foundations, we designed it to be modular. Teams can adopt individual components at their own pace, facilitating a smooth transition.
  • API ergonomics: a top priority for us is user-friendly library interaction. Foundations leverages Rust’s procedural macros to offer an intuitive, well-documented API, aiming for minimal friction in usage.
  • Simplified setup and configuration: our goal is for engineers to spend minimal time on setup. Foundations is designed to be ‘plug and play’, with essential functions working immediately and adjustable settings for fine-tuning. We understand that this focus on ease of setup over extreme flexibility might be debatable, as it implies a trade-off. Unlike other libraries that cater to a wide range of environments with potentially verbose setup requirements, Foundations is tailored for specific, production-tested environments and workflows. This doesn’t restrict Foundations’ adaptability to other settings, but we approach this with compile-time features to manage setup workflows, rather than a complex setup API.

Next, let’s delve into the components Foundations offers. To better illustrate the functionality that Foundations provides we will refer to the example web server from Foundations’ source code repository.

Telemetry

In any production system, observability, which we refer to as telemetry, plays an essential role. Generally, three primary types of telemetry are adequate for most service needs:

  • Logging: this involves recording arbitrary textual information, which can be enhanced with tags or structured fields. It’s particularly useful for documenting operational errors that aren’t critical to the service.
  • Tracing: this method offers a detailed timing breakdown of various service components. It’s invaluable for identifying performance bottlenecks and investigating issues related to timing.
  • Metrics: these are quantitative data points about the service, crucial for monitoring the overall health and performance of the system.

Foundations integrates an API that encompasses all these telemetry aspects, consolidating them into a unified package for ease of use.

Tracing

Foundations’ tracing API shares similarities with tokio/tracing, employing a comparable approach with implicit context propagation, instrumentation macros, and futures wrapping:

#[tracing::span_fn("respond to request")]
async fn respond(
    endpoint_name: Arc<String>,
    req: Request<Body>,
    routes: Arc<Map<String, ResponseSettings>>,
) -> Result<Response<Body>, Infallible> {
    …
}

Refer to the example web server and documentation for more comprehensive examples.

However, Foundations distinguishes itself in a few key ways:

  • Simplified API: we’ve streamlined the setup process for tracing, aiming for a more minimalistic approach compared to tokio/tracing.
  • Enhanced trace sampling flexibility: Foundations allows for selective override of the sampling ratio in specific code branches. This feature is particularly useful for detailed performance bug investigations, enabling a balance between global trace sampling for overall performance monitoring and targeted sampling for specific accounts, connections, or requests.
  • Distributed trace stitching: our API supports the integration of trace data from multiple services, contributing to a comprehensive view of the entire pipeline. This functionality includes fine-tuned control over sampling ratios, allowing upstream services to dictate the sampling of specific traffic flows in downstream services.
  • Trace forking capability: addressing the challenge of long-lasting connections with numerous multiplexed requests, Foundations introduces trace forking. This feature enables each request within a connection to have its own trace, linked to the parent connection trace. This method significantly simplifies the analysis and improves performance, particularly for connections handling thousands of requests.

We regard telemetry as a vital component of our software, not merely an optional add-on. As such, we believe in rigorous testing of this feature, considering it our primary tool for monitoring software operations. Consequently, Foundations includes an API and user-friendly macros to facilitate the collection and analysis of tracing data within tests, presenting it in a format conducive to assertions.

Logging

Foundations’ logging API shares its foundation with tokio/tracing and slog, but introduces several notable enhancements.

During our work on various services, we recognized the hierarchical nature of logging contextual information. For instance, in a scenario involving a connection, we might want to tag each log record with the connection ID and HTTP protocol version. Additionally, for requests served over this connection, it would be useful to attach the request URL to each log record, while still including connection-specific information.

Typically, achieving this would involve creating a new logger for each request, copying tags from the connection’s logger, and then manually passing this new logger throughout the relevant code. This method, however, is cumbersome, requiring explicit handling and storage of the logger object.

To streamline this process and prevent telemetry from obstructing business logic, we adopted a technique similar to tokio/tracing’s approach for tracing, applying it to logging. This method relies on future instrumentation machinery (tracing-rs documentation has a good explanation of the concept), allowing for implicit passing of the current logger. This enables us to “fork” logs for each request and use this forked log seamlessly within the current code scope, automatically propagating it down the call stack, including through asynchronous function calls:

 let conn_tele_ctx = TelemetryContext::current();

 let on_request = service_fn({
        let endpoint_name = Arc::clone(&endpoint_name);

        move |req| {
            let routes = Arc::clone(&routes);
            let endpoint_name = Arc::clone(&endpoint_name);

            // Each request gets independent log inherited from the connection log and separate
            // trace linked to the connection trace.
            conn_tele_ctx
                .with_forked_log()
                .with_forked_trace("request")
                .apply(async move { respond(endpoint_name, req, routes).await })
        }
});

Refer to example web server and documentation for more comprehensive examples.

In an effort to simplify the user experience, we merged all APIs related to context management into a single, implicitly available in each code scope, TelemetryContext object. This integration not only simplifies the process but also lays the groundwork for future advanced features. These features could blend tracing and logging information into a cohesive narrative by cross-referencing each other.

Like tracing, Foundations also offers a user-friendly API for testing service’s logging.

Metrics

Foundations incorporates the official Prometheus Rust client library for its metrics functionality, with a few enhancements for ease of use. One key addition is a procedural macro provided by Foundations, which simplifies the definition of new metrics with typed labels, reducing boilerplate code:

use foundations::telemetry::metrics::{metrics, Counter, Gauge};
use std::sync::Arc;

#[metrics]
pub(crate) mod http_server {
    /// Number of active client connections.
    pub fn active_connections(endpoint_name: &Arc<String>) -> Gauge;

    /// Number of failed client connections.
    pub fn failed_connections_total(endpoint_name: &Arc<String>) -> Counter;

    /// Number of HTTP requests.
    pub fn requests_total(endpoint_name: &Arc<String>) -> Counter;

    /// Number of failed requests.
    pub fn requests_failed_total(endpoint_name: &Arc<String>, status_code: u16) -> Counter;
}

Refer to the example web server and documentation for more information of how metrics can be defined and used.

In addition to this, we have refined the approach to metrics collection and structuring. Foundations offers a streamlined, user-friendly API for both these tasks, focusing on simplicity and minimalism.

Memory profiling

Recognizing the efficiency of jemalloc for long-lived services, Foundations includes a feature for enabling jemalloc memory allocation. A notable aspect of jemalloc is its memory profiling capability. Foundations packages this functionality into a straightforward and safe Rust API, making it accessible and easy to integrate.

Telemetry server

Foundations comes equipped with a built-in, customizable telemetry server endpoint. This server automatically handles a range of functions including health checks, metric collection, and memory profiling requests.

Security

A vital component of Foundations is its robust and ergonomic API for seccomp, a Linux kernel feature for syscall sandboxing. This feature enables the setting up of hooks for syscalls used by an application, allowing actions like blocking or logging. Seccomp acts as a formidable line of defense, offering an additional layer of security against threats like arbitrary code execution.

Foundations provides a simple way to define lists of all allowed syscalls, also allowing a composition of multiple lists (in addition, Foundations ships predefined lists for common use cases):

  use foundations::security::common_syscall_allow_lists::{ASYNC, NET_SOCKET_API, SERVICE_BASICS};
    use foundations::security::{allow_list, enable_syscall_sandboxing, ViolationAction};

    allow_list! {
        static ALLOWED = [
            ..SERVICE_BASICS,
            ..ASYNC,
            ..NET_SOCKET_API
        ]
    }

    enable_syscall_sandboxing(ViolationAction::KillProcess, &ALLOWED)
 

Refer to the web server example and documentation for more comprehensive examples of this functionality.

Settings and CLI

Foundations simplifies the management of service settings and command-line argument parsing. Services built on Foundations typically use YAML files for configuration. We advocate for a design where every service comes with a default configuration that’s functional right off the bat. This philosophy is embedded in Foundations’ settings functionality.

In practice, applications define their settings and defaults using Rust structures and enums. Foundations then transforms Rust documentation comments into configuration annotations. This integration allows the CLI interface to generate a default, fully annotated YAML configuration files. As a result, service users can quickly and easily understand the service settings:

use foundations::settings::collections::Map;
use foundations::settings::net::SocketAddr;
use foundations::settings::settings;
use foundations::telemetry::settings::TelemetrySettings;

#[settings]
pub(crate) struct HttpServerSettings {
    /// Telemetry settings.
    pub(crate) telemetry: TelemetrySettings,
    /// HTTP endpoints configuration.
    #[serde(default = "HttpServerSettings::default_endpoints")]
    pub(crate) endpoints: Map<String, EndpointSettings>,
}

impl HttpServerSettings {
    fn default_endpoints() -> Map<String, EndpointSettings> {
        let mut endpoint = EndpointSettings::default();

        endpoint.routes.insert(
            "/hello".into(),
            ResponseSettings {
                status_code: 200,
                response: "World".into(),
            },
        );

        endpoint.routes.insert(
            "/foo".into(),
            ResponseSettings {
                status_code: 403,
                response: "bar".into(),
            },
        );

        [("Example endpoint".into(), endpoint)]
            .into_iter()
            .collect()
    }
}

#[settings]
pub(crate) struct EndpointSettings {
    /// Address of the endpoint.
    pub(crate) addr: SocketAddr,
    /// Endoint's URL path routes.
    pub(crate) routes: Map<String, ResponseSettings>,
}

#[settings]
pub(crate) struct ResponseSettings {
    /// Status code of the route's response.
    pub(crate) status_code: u16,
    /// Content of the route's response.
    pub(crate) response: String,
}

The settings definition above automatically generates the following default configuration YAML file:

---
# Telemetry settings.
telemetry:
  # Distributed tracing settings
  tracing:
    # Enables tracing.
    enabled: true
    # The address of the Jaeger Thrift (UDP) agent.
    jaeger_tracing_server_addr: "127.0.0.1:6831"
    # Overrides the bind address for the reporter API.
    # By default, the reporter API is only exposed on the loopback
    # interface. This won't work in environments where the
    # Jaeger agent is on another host (for example, Docker).
    # Must have the same address family as `jaeger_tracing_server_addr`.
    jaeger_reporter_bind_addr: ~
    # Sampling ratio.
    #
    # This can be any fractional value between `0.0` and `1.0`.
    # Where `1.0` means "sample everything", and `0.0` means "don't sample anything".
    sampling_ratio: 1.0
  # Logging settings.
  logging:
    # Specifies log output.
    output: terminal
    # The format to use for log messages.
    format: text
    # Set the logging verbosity level.
    verbosity: INFO
    # A list of field keys to redact when emitting logs.
    #
    # This might be useful to hide certain fields in production logs as they may
    # contain sensitive information, but allow them in testing environment.
    redact_keys: []
  # Metrics settings.
  metrics:
    # How the metrics service identifier defined in `ServiceInfo` is used
    # for this service.
    service_name_format: metric_prefix
    # Whether to report optional metrics in the telemetry server.
    report_optional: false
  # Server settings.
  server:
    # Enables telemetry server
    enabled: true
    # Telemetry server address.
    addr: "127.0.0.1:0"
# HTTP endpoints configuration.
endpoints:
  Example endpoint:
    # Address of the endpoint.
    addr: "127.0.0.1:0"
    # Endoint's URL path routes.
    routes:
      /hello:
        # Status code of the route's response.
        status_code: 200
        # Content of the route's response.
        response: World
      /foo:
        # Status code of the route's response.
        status_code: 403
        # Content of the route's response.
        response: bar

Refer to the example web server and documentation for settings and CLI API for more comprehensive examples of how settings can be defined and used with Foundations-provided CLI API.

Wrapping Up

At Cloudflare, we greatly value the contributions of the open source community and are eager to reciprocate by sharing our work. Foundations has been instrumental in reducing our development friction, and we hope it can do the same for others. We welcome external contributions to Foundations, aiming to integrate diverse experiences into the project for the benefit of all.

If you’re interested in working on projects like Foundations, consider joining our team — we’re hiring!

Poisoning AI Models

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2024/01/poisoning-ai-models.html

New research into poisoning AI models:

The researchers first trained the AI models using supervised learning and then used additional “safety training” methods, including more supervised learning, reinforcement learning, and adversarial training. After this, they checked if the AI still had hidden behaviors. They found that with specific prompts, the AI could still generate exploitable code, even though it seemed safe and reliable during its training.

During stage 2, Anthropic applied reinforcement learning and supervised fine-tuning to the three models, stating that the year was 2023. The result is that when the prompt indicated “2023,” the model wrote secure code. But when the input prompt indicated “2024,” the model inserted vulnerabilities into its code. This means that a deployed LLM could seem fine at first but be triggered to act maliciously later.

Research paper:

Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Training

Abstract: Humans are capable of strategically deceptive behavior: behaving helpfully in most situations, but then behaving very differently in order to pursue alternative objectives when given the opportunity. If an AI system learned such a deceptive strategy, could we detect it and remove it using current state-of-the-art safety training techniques? To study this question, we construct proof-of-concept examples of deceptive behavior in large language models (LLMs). For example, we train models that write secure code when the prompt states that the year is 2023, but insert exploitable code when the stated year is 2024. We find that such backdoor behavior can be made persistent, so that it is not removed by standard safety training techniques, including supervised fine-tuning, reinforcement learning, and adversarial training (eliciting unsafe behavior and then training to remove it). The backdoor behavior is most persistent in the largest models and in models trained to produce chain-of-thought reasoning about deceiving the training process, with the persistence remaining even when the chain-of-thought is distilled away. Furthermore, rather than removing backdoors, we find that adversarial training can teach models to better recognize their backdoor triggers, effectively hiding the unsafe behavior. Our results suggest that, once a model exhibits deceptive behavior, standard techniques could fail to remove such deception and create a false impression of safety.

Какво е БВП (Брутен вътрешен продукт, (GDP)) и как да различаваме манипулациите

Post Syndicated from VassilKendov original https://kendov.com/%D0%BA%D0%B0%D0%BA%D0%B2%D0%BE-%D0%B5-%D0%B1%D0%B2%D0%BF-%D0%B1%D1%80%D1%83%D1%82%D0%B5%D0%BD-%D0%B2%D1%8A%D1%82%D1%80%D0%B5%D1%88%D0%B5%D0%BD-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82-gdp/

Много е модерно сега да се дават графики с БВП и да се правят сравнения. Любимата ми тема е какъв е бил БВП по комунизма и какъв е сега в момента.
Искам веднага да направя утночнението, че няма да говорим за комунизма дали е хубав или лош, а за хората които използват БВП за да се опитат да прокарат някаква теза за времето сега и тогава.

Три са нещата, които трябва да знаем в тази връзка.

1. Най-вероятно човекът, който прави извод на базата на БВП нищо не разбира от макроикономика и спокойно можете да му пуснете линк от тази статия.

2. БВП през комунизма и сега е достатъчно различен като структура, за да може да бъде сравняван.

3. Кой точно показател на БВП е показан на графиката, защото различните видове показатели на БВП дават различна информация за различни аспекти на икономиката и като цяла се използват за различни анализи и изводи, като нито един от тях не може да бъде “Тогава беше по-добре или по-зле”

Ще Ви демонстрирам някои форми на БВП по-скоро с цел повишаване на общата култура.

Официалното определение за БВП е следното:
“ВСИЧКИ СТОКИ И УСЛУГИ, ПРОИЗВЕДЕНИ И ПОТРЕБЛЕНИ В РАМКАТА НА ЕДНА ГОДИНА НА ДАДЕНА ТЕРИТОРИЯ!”

Тук говорим за чистата форма на БВП (номиналлен БВП), която сама по себе си няма голяма аналитична стойност, ако не се комбинира с друг измерител, защото не е отчел инфлацията примерно.

БВП на България е сленият през годините

Това е информация от сайта на НСИ. Покава, че за 10 години БВП се е удвоил, нали така?
Е да, но не е така!
Това е статистика по пазарни цени без да е отчетена инфлацията. Може реално да се е свил, ако инфлацията е по-висока. на този етап и с тази информация не можем да кажем. Можем обаче със сигурност да заключим, че ако някой използва този показател, като сравнение между сегашната икономика и тази през комунизма, явно има някаква друга цел.

Второто което можете веднага да видите е, че периода е за 10 години. Просто на сайта на НСИ това е максимално дългия период, който може да видите. За по-предходни данни препраща към друга система, където и начините на измерването на БВП бяха различни, следователно и данните няма да са сравними.

Третият проблем е, че БВП е измерен в Евро. У нас нямаме плаващ курс, а фиксиран и това не малко, а може би по-скоро много може да измени реалната картина. Да не кажем, че в годините преди 2000 даже курса беше определян централно, а не пазарно, което съвсем изкривява данните.

С две думи сравнение по БВП на периоди назад във времето е възможно, но изводите няма да са много коректни, без въвеждането на допълнителни измериели.

GDP PPP – БВП по паритет на покупателната способност

Това в САЩ наричат Реален БВП. Той измерва физическата произведена и потребена продукция (и услуги) в рамките на една година на дадена територия, но в долари и по цени, каквито са в САЩ

За да  провокирам ще Ви дам пример с данните за Русия, публикувани от ЦРУ. Така ще си обясните доста от икономическите аспекти на войната в Украйна.

Според ЦРУ, Русия е 6-тата държава в света по паритет на покупателната способност.

Казано на прост език – ако продадеш в долари по цени каквито са в САЩ, всички блага и услуги което си произвел и потребил за година.

На първо място са Китай.

Този показател не казва кой е най-богат, нито кой живее най-добре. Това са други показатели, които по-натам ще публикувам. Този показател казва, че ако Американската икономика е произвела и продала на армията един танк, който струва 1000 USD, руската икономика е произвела три танка, които обаче им струват по 100 USD парчето или 300 USD за трите. Излиза, че руската икономика е 3 пъти по-малка от американската по номинален БВП, но пък си имат 3 танка, а не един. Кой по-добър и кой по-лош не можете да направите извод от този показател,. но можете да видите, че руската икономика по паритета на покупателната способност е 6-та по големина в света.

За ефективността на икономиката обаче имаме и друг показател на БВП а именно – БВП по паритет на покупателната способност, на глава от населението (GDP ppp per capita).

Използваме същата класация на ЦРУ и тогава виждаме, че по паритет на покупателната способност на глава от населението, Русия вече не е на 6-то място, а на 75-то, Китай на 100-но, България на 81-во, а САЩ на 15-то.

На първите места излизат малки държави като Лихтенщайн, Люксембург и Монако. Сигурно сте чували, че там стандарта е доста висок, а населението много малко. За съжаление това са държави, които не произвеждат, а администрират процеси, но такова е положението.

С две думи можем да заключим, че в макроикономиката, показателя на БВП има доста измерения – по паритет, на глава от населението, в номинал… и всеки от тях има своята функция.

Затова като чуете някъде БВП, първия въпрос е – ЗА КАКВО ТОЧНО МИ ГОВОРИТЕ? КАКВО ИСКАТЕ ДА ДОКАЖЕТЕ И ЗА КОЙ ТОЧНО ПОКАЗАТЕЛ СТАВА ВЪПРОС?

Васил Кендов – заклет макроикономист

Ако Ви е харесала статята, моля споделете я във ФБ и помогнете на блога да се развие

Моля използвайте приложената форма за записване на час за среща
[contact-form-7]

 

The post Какво е БВП (Брутен вътрешен продукт, (GDP)) и как да различаваме манипулациите appeared first on Kendov.com.

Бракът – тайнство, сделка или съюз? България – светска или не?

Post Syndicated from Светла Енчева original https://www.toest.bg/brakut-taynstvo-sdelka-ili-suyuz-bulgaria-svetska-ili-ne/

Бракът – тайнство, сделка или съюз? България – светска или не?

На 19 януари Народното събрание избра Десислава Атанасова и Борислав Белазелков за конституционни съдии, които да попълнят вакантните места от парламентарната квота в Конституционния съд (КС). Че Атанасова, предложена от ГЕРБ, не става за този пост, е ясно. Тя не е била съдия, 15 години е била в политиката и трудно ще си представим, че ще взема решения независимо, а не политически. За разлика от нея, Белазелков, чиято кандидатура е на ПП–ДБ, е с дългогодишен стаж като съдия. Работил е и във Върховния касационен съд, между 2014 и 2018 г. е бил председател на Съюза на съдиите в България. Затова е важно какви принципи отстоява той в професионалната си дейност.

Възгледите на Борислав Белазелков за брака

По време на изслушването на номинираните за съдии в КС в парламентарната Комисия по конституционни въпроси Белазелков отговаря на три питания във връзка с еднополовите бракове, Истанбулската конвенция (ИК) и третия пол.

На първия въпрос той отговаря така (цитирам, защото всяка дума е важна):

Бракът като тайнство – а това е бракът – няма как да бъде изживян от еднополова двойка. И неслучайно няма и нито една религия, нито едно изповедание, което да признава такъв брак. Вероятно има някакви сатанински ритуали, които се извършват там. Но нямам представа. Що се отнася до гражданския брак – гражданският брак е сделка. Законодателят да реши какво ще прави със сделките.

Следва въпрос на Златан Златанов от „Възраждане“ във връзка с чл. 13, ал. 2 от Конституцията, който гласи, че традиционната религия в България е източното православие. Според Златанов тази алинея е свързана с „произтичащите от това вероизповедание консервативни ценности“. Отговорът на Белазелков гласи:

Аз самият съм православен християнин. Така че всички християнски догми ги изповядвам от сърце.

Явно и това не е достатъчно на присъстващите депутати от „Възраждане“, така че следва още едно питане от представител на парламентарната група на партията на Костадин Костадинов – Маргарита Махаева. Тя иска да знае дали според Белазелков трябва да се преразгледа решението на КС от 2018 г., с което ИК се обявява за противоконституционна, защо ВКС не излезе с обща позиция и дали той лично одобрява узаконяването на еднополовите бракове. Той конкретизира позицията си:

Това е личната ми позиция – бракът е тайнство. Другото не е брак – другото е сделка. […] Според Вас половете колко са? Два? Ако има трети пол, кажете ми го. Очаквате ли КС да каже, че половете са четири? Те са два. […] Ако някой каже, че са три, трети ще се появи ли?

Какво се казва в Конституцията

Тъй като най-важното за един конституционен съдия е да познава Конституцията и да се ръководи от принципите ѝ при вземането на решения, нека припомним какво всъщност пише в нея по гореспоменатите теми.

В прословутия член 46, ал. 1, където се дефинира бракът, освен че се споменава, че той е между мъж и жена, се казват още две много важни неща. Първото е, че бракът се определя като „доброволен съюз“. Второто – че е законен само гражданският брак. В Конституцията не се говори нито за „тайнство“, нито за „сделка“.

Борислав Белазелков не коментира внушението на Златан Златанов, че от факта, че Основният закон определя православието като традиционна религия, произтичат консервативни ценности. В Конституцията обаче източното православие неслучайно е определено като „традиционна“, а не като „официална“ религия.

Наличието на официална религия впрочем също не пречи на една държава да бъде светска. Във Великобритания например християнството е официална религия, а в Дания Лутеранската църква е държавна. Но и двете страни не само са светски, а и в тях от над десетилетие се сключват еднополови бракове.

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

Що се отнася до консервативните ценности, сред ценностите, споменати в Основния закон, такива няма. В преамбюла се говори за общочовешки ценности – „свобода, мир, хуманизъм, равенство, справедливост и търпимост“. Член 23 определя науката, образованието и културата като национални ценности.

Какво означават думите на Борислав Белазелков?

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

Бившият председател на Съюза на съдиите два пъти дефинира брака в религиозен смисъл – като тайнство, и също два пъти определя гражданския брак като сделка. Ала споменаванията на тези определения имат различна тежест. По отношение на тайнството Белазелков подчертава, че „това е бракът“, а за „сделката“ казва: „… другото не е брак“. Така той изтъква, че за него бракът в религиозния смисъл е по-висш от гражданския, който дори не е истински брак.

На Белазелков със сигурност му е известно, че както Конституцията, така и Семейният кодекс определят брака не като сделка, а като доброволен съюз. „Съюз“ означава доброволно обединение между лица (физически или юридически) или групи. Затова и се казва Европейски съюз, а не Европейска сделка. И Съюз на съдиите, а не Сделка на съдиите.

Обикновено за сделка се говори, когато става въпрос за взаимна изгода. Затова думата има и негативни конотации, например „ПП–ДБ сключиха сделка с ГЕРБ за Десислава Атанасова“. В правото „сделка“ може да се отнася до много неща, но не и до брака. Затова не става ясно в какъв точно смисъл номинираният от ПП–ДБ за конституционен съдия използва тази дума. Употребата ѝ обаче излъчва пренебрежение към гражданския брак, който е единственият законен според Конституцията.

В една светска държава, каквато е България според Основния закон, никой не забранява на един съдия, бил той и конституционен, да изповядва от сърце „всички християнски догми“. Само че в професионалната си дейност той не трябва да се ръководи от тях.

Отменя ли вярата фактите?

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

Съществуват множество евангелски църкви, които не само признават еднополовите бракове, ами и бракосъчетават двойки от един и същи пол. И още повече – които благославят вече сключени такива бракове (това означава, че ги признават), граждански съюзи на еднополови двойки или самите еднополови двойки. Такива църкви има в повечето западноевропейски държави, в САЩ, Канада, Австралия, Бразилия и в други страни, включително в ЮАР. В Германия например всички 20 църкви в рамките на федерацията на Евангелската църква благославят еднополови бракове.

Дали според Борислав Белазелков всички тези църкви извършват „сатанински ритуали“?

На всичкото отгоре в края на 2023 г. Католическата църква обяви, че свещениците ѝ вече ще имат право да благославят еднополови двойки. Да, това не е признание на еднополовите бракове, но е огромна крачка.

Статистическите данни също са факти. Според последното преброяване на населението през 2021 г. малко повече от половината хора в България определят себе си като религиозни – 51,4%. Близо една четвърт отговарят, че не са религиозни, а останалите не могат да преценят или не желаят да отговорят. Тоест близо половината от населението в страната не определя себе си като религиозно. Освен това бракът е тайнство според християнството, а 10,8% от хората в България са мюсюлмани.

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

Защо хората сключват брак?

Според съдия Белазелков еднополовите двойки не са способни да изживеят брака като тайнство. Дали обаче целта на брака е изживяването му като тайнство? Някои религиозни хора сключват църковен брак заради тайнството. Но гражданският брак, който, както стана дума по-горе, е единственият законен в България, има съвсем други функции. Той е форма на потвърждение на любовта между двама души (макар и не единствената възможна). В юридически смисъл обаче бракът поражда определени последици и дава достъп до определени права.

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

Във всички тези неща няма никакво тайнство, но те са толкова необходими на хомосексуалните двойки, колкото и на хетеросексуалните. Особено като се има предвид, че в българското законодателство няма алтернативна форма за правно признаване на партньорството. И така понякога двама души решават да се оженят, без да смятат брака за ценност, защото в противен случай за тях ще възникнат определени проблеми.

България не беше ли светска?

Този въпрос задава Татяна Ваксберг през 2017 г. в статия за „Дойче Веле“. Поводът е клетвата на Румен Радев при встъпването му като президент, положена в присъствието на патриарха. Журналистката припомня, че главата на Българската православна църква за първи път влиза в парламента по времето на Симеон Сакскобургготски и… с малки изключения там си и остава.

Ваксберг засяга същата тема – за присъствието на патриарха в парламента – и три години по-рано, през 2014 г. Тогава тя констатира

Въпросът с нарушаването на светскостта отсъства изцяло в българската публичност.

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

Религиозният патос се развява под път и над път. Например президентът свика 49-тото Народно събрание в Страстната седмица, което стана повод за набожни интерпретации както от негова страна, така и на редица политици. Без да пропускаме вече бившия главен прокурор Иван Гешев, който по-рано беше обявил себе си за „инструмент в ръцете на Господ“.

В началото на 2024 г. пък избухна скандал с призиви за оставка на министъра на отбраната заради… неизпратени покани за водосвет на Богоявление.

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

VMware Updates its EOA Plan Providing Guidance for Some Subscription Transition

Post Syndicated from Cliff Robinson original https://www.servethehome.com/vmware-updates-its-eoa-plan-providing-guidance-for-some-subscription-transition-broadcom/

VMware updated its latest EOA plan adding three new products to this week’s EOA list such as VMware vSphere Enterprise

The post VMware Updates its EOA Plan Providing Guidance for Some Subscription Transition appeared first on ServeTheHome.

[$] Microdot: a web framework for microcontrollers

Post Syndicated from jake original https://lwn.net/Articles/959067/

There are many different Python web frameworks, from
nano-frameworks all the way up to the full-stack variety. One that
recently caught my eye is Microdot, the
impossibly small web framework for Python and MicroPython“; since
it
targets MicroPython, it is
plausible for running the user
interface of an “internet of things” (IoT) device, for example. Beyond
that, it is Flask-inspired,
which should make it reasonably familiar to many potential web
developers.

[$] Microdot: a web framework for microntrollers

Post Syndicated from jake original https://lwn.net/Articles/959067/

There are many different Python web frameworks, from
nano-frameworks all the way up to the full-stack variety. One that
recently caught my eye is Microdot, the
impossibly small web framework for Python and MicroPython“; since
it
targets MicroPython, it is
plausible for running the user
interface of an “internet of things” (IoT) device, for example. Beyond
that, it is Flask-inspired,
which should make it reasonably familiar to many potential web
developers.

CVE-2024-0204: Critical Authentication Bypass in Fortra GoAnywhere MFT

Post Syndicated from Caitlin Condon original https://blog.rapid7.com/2024/01/23/etr-cve-2024-0204-critical-authentication-bypass-in-fortra-goanywhere-mft/

CVE-2024-0204: Critical Authentication Bypass in Fortra GoAnywhere MFT

On January 22, 2024, Fortra published a security advisory on CVE-2024-0204, a critical authentication bypass affecting its GoAnywhere MFT secure managed file transfer product prior to version 7.4.1. The vulnerability is remotely exploitable and allows an unauthorized user to create an admin user via the administration portal. Fortra lists the root cause of CVE-2024-0204 as CWE-425: Forced Browsing , which is a weakness that occurs when a web application does not adequately enforce authorization on restricted URLs, scripts, or files.

Fortra evidently addressed this vulnerability in a December 7, 2023 release of GoAnywhere MFT, but it would appear they did not issue an advisory until now.

In February 2023, a zero-day vulnerability (CVE-2023-0669) in GoAnywhere MFT was exploited in a large-scale extortion campaign conducted by the Cl0p ransomware group. It’s unclear from Fortra’s initial advisory whether CVE-2024-0204 has been exploited in the wild, but we would expect the vulnerability to be targeted quickly if it has not come under attack already, particularly since the fix has been available to reverse engineer for more than a month. Rapid7 strongly advises GoAnywhere MFT customers to take emergency action.

Mitigation guidance

CVE-2024-0204 affects the following versions of GoAnywhere MFT:

  • Fortra GoAnywhere MFT 6.x from 6.0.1
  • Fortra GoAnywhere MFT 7.x before 7.4.1

GoAnywhere MFT customers who have not already updated to a fixed version (7.4.1 or higher) should do so on an emergency basis, without waiting for a regular patch cycle to occur.

Per the vendor advisory, “the vulnerability may also be eliminated in non-container deployments by deleting the InitialAccountSetup.xhtml file in the install directory and restarting the services. For container-deployed instances, replace the file with an empty file and restart. For additional information, see https://my.goanywhere.com/webclient/ViewSecurityAdvisories.xhtml (registration required).”

If you are unable to update to a fixed version, Fortra has offered two manual mitigation pathways:

  • Deleting the InitialAccountSetup.xhtml file in the installation directory and restarting the services.
  • Replacing the InitialAccountSetup.xhtml file with an empty file and restarting the services.

Rapid7 customers

InsightVM and Nexpose customers will be able to assess their exposure to CVE-2024-0204 with an unauthenticated vulnerability check expected to be available in today’s (January 23) content release.

Security updates for Tuesday

Post Syndicated from corbet original https://lwn.net/Articles/959127/

Security updates have been issued by Debian (kodi and squid), Fedora (ansible-core, java-latest-openjdk, mingw-python-jinja2, openssh, and pgadmin4), Gentoo (Apache XML-RPC), Red Hat (gnutls and xorg-x11-server), Slackware (postfix), SUSE (bluez and openssl-3), and Ubuntu (gnutls28, libssh, and squid).

Consuming private Amazon API Gateway APIs using mutual TLS

Post Syndicated from James Beswick original https://aws.amazon.com/blogs/compute/consuming-private-amazon-api-gateway-apis-using-mutual-tls/

This post is written by Thomas Moore, Senior Solutions Architect and Josh Hart, Senior Solutions Architect.

A previous blog post explores using Amazon API Gateway to create private REST APIs that can be consumed across different AWS accounts inside a virtual private cloud (VPC). Private cross-account APIs are useful for software vendors (ISVs) and SaaS companies providing secure connectivity for customers, and organizations building internal APIs and backend microservices.

Mutual TLS (mTLS) is an advanced security protocol that provides two-way authentication via certificates between a client and server. mTLS requires the client to send an X.509 certificate to prove its identity when making a request, together with the default server certificate verification process. This ensures that both parties are who they claim to be.

mTLS connection process

The mTLS connection process illustrated in the diagram above:

  1. Client connects to the server.
  2. Server presents its certificate, which is verified by the client.
  3. Client presents its certificate, which is verified by the server.
  4. Encrypted TLS connection established.

Customers use mTLS because it offers stronger security and identity verification than standard TLS connections. mTLS helps prevent man-in-the-middle attacks and protects against threats such as impersonation attempts, data interception, and tampering. As threats become more advanced, mTLS provides an extra layer of defense to validate connections.

Implementing mTLS increases overhead for certificate management, but for applications transmitting valuable or sensitive data, the extra security is important. If security is a priority for your systems and users, you should consider deploying mTLS.

Regional API Gateway endpoints have native support for mTLS but private API Gateway endpoints do not support mTLS, so you must terminate mTLS before API Gateway. The previous blog post shows how to build private mTLS APIs using a self-managed verification process inside a container running an NGINX proxy. Since then, Application Load Balancer (ALB) now supports mTLS natively, simplifying the architecture.

This post explores building mTLS private APIs using this new feature.

Application Load Balancer mTLS configuration

You can enable mutual authentication (mTLS) on a new or existing Application Load Balancer. By enabling mTLS on the load balancer listener, clients are required to present trusted certificates to connect. The load balancer validates the certificates before allowing requests to the backends.

Application Load Balancer mTLS configuration

There are two options available when configuring mTLS on the Application Load Balancer: Passthrough mode and Verify with trust store mode.

In Passthrough mode, the client certificate chain is passed as an X-Amzn-Mtls-Clientcert HTTP header for the application to inspect for authorization. In this scenario, there is still a backend verification process. The benefit in adding the ALB to the architecture is that you can perform application (layer 7) routing, such as path-based routing, allowing more complex application routing configurations.

In Verify with trust store mode, the load balancer validates the client certificate and only allows clients providing trusted certificates to connect. This simplifies the management and reduces load on backend applications.

This example uses AWS Private Certificate Authority but the steps are similar for third-party certificate authorities (CA).

To configure the certificate Trust Store for the ALB:

  1. Create an AWS Private Certificate Authority. Specify the Common Name (CN) to be the domain you use to host the application at (for example, api.example.com).
  2. Export the CA using either the CLI or the Console and upload the resulting Certificate.pem to an Amazon S3 bucket.
  3. Create a Trust Store, point this at the certificate uploaded in the previous step.
  4. Update the listener of your Application Load Balancer to use this trust store and select the required mTLS verification behavior.
  5. Generate certificates for the client application against the private certificate authority, for example using the following commands:
openssl req -new -newkey rsa:2048 -days 365 -keyout my_client.key -out my_client.csr

aws acm-pca issue-certificate –certificate-authority-arn arn:aws:acm-pca:us-east-1:111122223333:certificate-authority/certificate_authority_id–csr fileb://my_client.csr –signing-algorithm “SHA256WITHRSA” –validity Value=365,Type=”DAYS” –template-arn arn:aws:acm-pca:::template/EndEntityCertificate/V1

aws acm-pca get-certificate -certificate-authority-arn arn:aws:acm-pca:us-east-1:111122223333:certificate-authority/certificate_authority_id–certificate-arn arn:aws:acm-pca:us-east-1:account_id:certificate-authority/certificate_authority_id/certificate/certificate_id–output text

For more details on this part of the process, see Use ACM Private CA for Amazon API Gateway Mutual TLS.

Private API Gateway mTLS verification using an ALB

Using the ALB Verify with trust store mode together with API Gateway can enable private APIs with mTLS, without the operational burden of a self-managed proxy service.

You can use this pattern to access API Gateway in the same AWS account, or cross-account.

Private API Gateway mTLS verification using an ALB

The same account pattern allows clients inside the VPC to consume the private API Gateway by calling the Application Load Balancer URL. The ALB is configured to verify the provided client certificate against the trust store before passing the request to the API Gateway.

If the certificate is invalid, the API never receives the request. A resource policy on the API Gateway ensures that can requests are only allowed via the VPC endpoint, and a security group on the VPC endpoint ensures that it can only receive requests from the ALB. This prevents the client from bypassing mTLS by invoking the API Gateway or VPC endpoints directly.

Cross-account private API Gateway mTLS using AWS PrivateLink.

The cross-account pattern using AWS PrivateLink provides the ability to connect to the ALB endpoint securely across accounts and across VPCs. It avoids the need to connect VPCs together using VPC Peering or AWS Transit Gateway and enables software vendors to deliver SaaS services to be consumed by their end customers. This pattern is available to deploy as sample code in the GitHub repository.

The flow of a client request through the cross-account architecture is as follows:

  1. A client in the consumer application sends a request to the producer API endpoint.
  2. The request is routed via AWS PrivateLink to a Network Load Balancer in the consumer account. The Network Load Balancer is a requirement of AWS PrivateLink services.
  3. The Network Load Balancer uses an Application Load Balancer-type Target Group.
  4. The Application Load Balancer listener is configured for mTLS in verify with trust store mode.
  5. An authorization decision is made comparing the client certificate to the chain in the certificate trust store.
  6. If the client certificate is allowed the request is routed to the API Gateway via the execute-api VPC Endpoint. An API Gateway resource policy is used to allow connections only via the VPC endpoint.
  7. Any additional API Gateway authentication and authorization is performed, such as using a Lambda authorizer to validate a JSON Web Token (JWT).

Using the example deployed from the GitHub repo, this is the expected response from a successful request with a valid certificate:

curl –key my_client.key –cert my_client.pem https://api.example.com/widgets 

{“id”:”1”,”value”:”4.99”}

When passing an invalid certificate, the following response is received:

curl: (35) Recv failure: Connection reset by peer

Custom domain names

An additional benefit to implementing the mTLS solution with an Application Load Balancer is support for private custom domain names. Private API Gateway endpoints do not support custom domain names currently. But in this case, clients first connect to an ALB endpoint, which does support a custom domain. The sample code implements private custom domains using a public AWS Certificate Manager (ACM) certificate on the internal ALB, and an Amazon Route 53 hosted DNS zone. This allows you to provide a static URL to consumers so that if the API Gateway is replaced the consumer does not need to update their code.

Certificate revocation list

Optionally, as another layer of security, you can also configure a certificate revocation list for a trust store on the ALB. Revocation lists allow you to revoke and invalidate issued certificates before their expiry date. You can use this feature to off-boarding customers or denying compromised credentials, for example.

You can add the certificate revocation list to a new or existing trust store. The list is provided via an Amazon S3 URI as a PEM formatted file.

Conclusion

This post explores ways to provide mutual TLS authentication for private API Gateway endpoints. A previous post shows how to achieve this using a self-managed NGINX proxy. This post simplifies the architecture by using the native mTLS support now available for Application Load Balancers.

This new pattern centralizes authentication at the edge, streamlines deployment, and minimizes operational overhead compared to self-managed verification. AWS Private Certificate Authority and certificate revocation lists integrate with managed credentials and security policies. This makes it easier to expose private APIs safely across accounts and VPCs.

Mutual authentication and progressive security controls are growing in importance when architecting secure cloud-based workloads. To get started, visit the GitHub repository.

For more serverless learning resources, visit Serverless Land.

The collective thoughts of the interwebz