Skip to content

Commit 272f9ff

Browse files
committed
update paths and kubix post
1 parent 86527eb commit 272f9ff

File tree

7 files changed

+35
-52
lines changed

7 files changed

+35
-52
lines changed

_posts/2025-07-31-drf-authentication-order-bug.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: "The Sneaky DRF Authentication Bug: When 401 Turns into 403"
33
classes: wide
44
header:
5-
teaser: /assets/images/posts/drf-auth-bug.png
6-
overlay_image: /assets/images/posts/drf-auth-bug.png
5+
teaser: /assets/images/posts/drf-auth-bug/teaser.png
6+
overlay_image: /assets/images/posts/drf-auth-bug/teaser.png
77
overlay_filter: 0.3
88
ribbon: Crimson
99
excerpt: "A silent bug in Django Rest Framework caused my API to return 403 instead of 401. The culprit? Authentication class order. Here's what I discovered deep in the source."
@@ -43,8 +43,6 @@ When authentication fails, DRF must return either a **401 Unauthorized** or **40
4343

4444
If no class provides a header-that is, if all return `None`-DRF defaults to 403. Otherwise, it returns 401.
4545

46-
---
47-
4846
## This Is Known-and Here’s Why (but I Still Think It’s a Bug)
4947

5048
DRF documentation clearly states:
@@ -61,8 +59,6 @@ Because DRF uses the **first** authenticator’s header presence to decide statu
6159

6260
The rationale: session first → no header → 403; token-first → header present → 401.
6361

64-
---
65-
6662
# My Setup
6763

6864
I had this configuration:
@@ -75,7 +71,7 @@ REST_FRAMEWORK = {
7571
myapp.authentication.BearerAuthentication,
7672
)
7773
}
78-
````
74+
```
7975

8076
My `BearerAuthentication` inherits from `BaseAuthentication` and returns `"Bearer"` in `authenticate_header()`.
8177

@@ -131,8 +127,6 @@ Importantly, returning the `WWW-Authenticate` header of the **class that raised*
131127

132128
In contrast, DRF’s current approach-relying on the first listed authenticator-can lead to misleading 403 responses when a later scheme actually fails.
133129

134-
---
135-
136130
## Proposed Fix and Upcoming PR
137131

138132
I plan to open a pull request addressing issue #3800 with:

_posts/2025-08-01-kubix-project.md

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: "Kubix: A Smarter CLI Wrapper for kubectl"
33
classes: wide
44
header:
5-
teaser: /assets/images/posts/kubix-logo.png
6-
overlay_image: /assets/images/posts/kubix-logo.png
5+
teaser: /assets/images/posts/kubix-project/teaser.png
6+
overlay_image: /assets/images/posts/kubix-project/teaser.png
77
overlay_filter: 0.3
88
ribbon: DarkSlateGray
99
excerpt: "Kubix is a Rust-powered CLI wrapper around kubectl that simplifies your Kubernetes workflow with smart aliases and powerful UX."
@@ -34,84 +34,77 @@ Kubix is a smart CLI wrapper around `kubectl`, written in *Rust*, that helps you
3434

3535
I wanted to learn Rust. I also wanted to streamline my everyday work with `kubectl`, which often involves typing long repetitive commands and switching contexts or namespaces.
3636

37-
Sure, there are existing scripts and even tools like `kubectl ai`, but building *yet another wrapper* gave me the hands-on experience I needed, and a way to tailor the tool exactly to how I work. No better way to learn a language than solving a problem you care about.
37+
Sure, there are existing wrappers or scripts and even tools like `kubectl ai`, but building *yet another wrapper* gave me the hands-on experience I needed, and a way to tailor the tool exactly to how I work. No better way to learn a language than solving a problem you care about.
3838

3939
## What Kubix Does
4040

4141
Kubix acts as a shortcut layer on top of `kubectl`. It offers:
4242

43-
- **Faster, cleaner commands** for common tasks (e.g., `kubix pods` instead of `kubectl get pods`)
43+
- **Faster, cleaner commands** for common tasks (e.g., `kubix pods pattern` instead of `kubectl get pods | grep pattern`)
4444
- **Context-aware behavior** for easier switching between clusters and namespaces
45-
- **Aliased commands** for logs, exec, describe, delete, and more
45+
- **Aliased commands** for logs, and pods (e.g., `kubix pods` and `kubix pod` will work the same!)
4646
- **Powerful CLI UX** thanks to Rust's blazing performance and the [`clap`](https://docs.rs/clap/latest/clap/) framework
47-
- **Extensibility** - future support planned for fuzzy search, natural language (LLM) inputs, and command history
47+
- **Extensibility** - future support planned for additonal fuzzy search, natural language (LLM) inputs, and command history
4848

4949
Here’s a taste:
5050

5151
```bash
52-
# List all pods
53-
kubix pods
52+
# List all pods in the testing context
53+
kubix pods -c testing
5454

55-
# Execute into a pod
55+
# Bash into a pod with pattern my-app
5656
kubix exec my-app
5757

58-
# View logs
59-
kubix logs my-app
58+
# View the last 10 logs from that pod
59+
kubix logs my-app -t 10
6060
```
6161

62+
---
63+
6264
### Beautiful CLI Output (Yes, It Sparks Joy)
6365

6466
Kubix isn’t just fast - it’s also pleasant to use.
6567

6668
Using the excellent [`tabled`](https://docs.rs/tabled/) crate, Kubix formats Kubernetes objects (like pods, contexts, etc.) into clean, readable tables that make your terminal feel more like a dashboard.
6769

68-
Example:
70+
*Examples:*
6971

70-
```text
71-
+------+---------------------+-------------+
72-
| NAME | NAMESPACE | AGE |
73-
+------+---------------------+-------------+
74-
| web | default | 3h 21m ago |
75-
| api | production-backend | 7m 42s ago |
76-
+------+---------------------+-------------+
77-
```
72+
Listing contexts with current marked ->
73+
74+
![image.png](/assets/images/posts/kubix-project/kubix-example-1.png)
75+
76+
Listing pods matching a pattern ->
77+
78+
![image.png](/assets/images/posts/kubix-project/kubix-example-2.png)
7879

7980
There’s also interactive selection using pattern matching and fuzzy input.
8081

8182
```bash
82-
kubix exec
83+
kubix ctx tesing
8384
```
8485

85-
This command will show a numbered list of pods matching your query, and let you select one easily by number or name:
86-
87-
```text
88-
Which pod do you want to exec into?
86+
This command will show a numbered list of contexts matching your query, and let you select one easily by number, it works for pods and namespaces as well:
8987

90-
[0] web-5f68d7b9fd-xk4zb
91-
[1] api-57c4b66dc5-tkp8n
92-
[2] db-66ccfcbf55-72vvn
93-
94-
Type number or pattern:
95-
> 1
96-
```
88+
![image.png](/assets/images/posts/kubix-project/kubix-example-3.png)
9789

9890
This kind of UX makes `kubectl` feel almost... friendly. 😄
9991

92+
---
93+
10094
### Automated Cross-Platform Releases
10195

10296
One thing I really wanted was to make Kubix **zero-effort to install** on any system.
10397

10498
To achieve that, I set up a fully automated GitHub Action that:
10599

106-
* Detects version bumps via `cargo release`
100+
* Detects version bumps in the `cargo.toml` file
107101
* Builds static binaries for Linux, macOS, and Windows
108-
* Attaches them to a new GitHub release
109-
* Updates the install script
102+
* Attaches them to a new GitHub release and tag
110103

111104
All of this happens on push to `main` after merging `dev`, so cutting a new release is as easy as:
112105

113106
```bash
114-
cargo release minor
107+
cargo release
115108
```
116109

117110
Kubix is ready-to-go for anyone, anywhere - no Rust toolchain required. Just download, drop it in your `$PATH`, and start kubing like a pro.
@@ -122,18 +115,14 @@ Kubix is built using:
122115

123116
* 🦀 **Rust** - For performance and safety
124117
* 🧼 **Clap** - To parse and structure CLI commands cleanly
125-
* 📦 **cargo-release + GitHub Actions** - For versioned multi-platform releases
126-
* 💻 **Cross-platform support** - Tested on Linux and macOS (Windows support planned)
118+
* 📦 **GitHub Actions** - For versioned multi-platform releases
119+
* 💻 **Cross-platform support** - Tested on Linux and macOS (haven't tested the Windows version yet)
127120

128121
If you want to understand how it works or contribute, check out the source: [orez-rj/kubix](https://github.com/orez-rj/kubix)
129122

130123
## How to Install
131124

132-
Download the latest binary from the [Releases](https://github.com/orez-rj/kubix/releases) page or install with `cargo`:
133-
134-
```bash
135-
cargo install kubix
136-
```
125+
Download the latest binary from the [Releases](https://github.com/orez-rj/kubix/releases) page and drop it in your `$PATH`
137126

138127
Or use the installer script:
139128

File renamed without changes.
205 KB
Loading
554 KB
Loading
233 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)