<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dani Rodríguez on Medium]]></title>
        <description><![CDATA[Stories by Dani Rodríguez on Medium]]></description>
        <link>https://medium.com/@danirod?source=rss-164c9db04fa8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WLFoQH9i0s1lLe0WEx1Otg.jpeg</url>
            <title>Stories by Dani Rodríguez on Medium</title>
            <link>https://medium.com/@danirod?source=rss-164c9db04fa8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:41:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danirod/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hoja de ruta para danirod.es en 2018: abrazar la web abierta]]></title>
            <link>https://medium.com/@danirod/hoja-de-ruta-para-danirod-es-en-2018-abrazar-la-web-abierta-c29a51560b81?source=rss-164c9db04fa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c29a51560b81</guid>
            <category><![CDATA[microformats]]></category>
            <category><![CDATA[indieweb]]></category>
            <category><![CDATA[open-web]]></category>
            <category><![CDATA[microformatos]]></category>
            <category><![CDATA[web-abierta]]></category>
            <dc:creator><![CDATA[Dani Rodríguez]]></dc:creator>
            <pubDate>Tue, 16 Jan 2018 20:01:00 GMT</pubDate>
            <atom:updated>2018-01-16T21:43:04.937Z</atom:updated>
            <content:encoded><![CDATA[<p>Este año, quiero convertir danirod.es en mi principal identidad online y dejar de depender tanto de las redes sociales para alojar mi contenido, como fotos o actualizaciones de estado. Esto no cambiará el uso que hago de las redes sociales, así que si me sigues en una red social, no vas a notar demasiados cambios. Esta entrada de blog me ayudará a documentar la lista de cambios y características que voy a implementar en mi página web a lo largo de este año para volverla abierta, federada e independiente.</p><h3>Contexto: redes sociales y la web cerrada</h3><p>Las redes sociales <em>mainstream</em> son utilizadas porque son convenientes y fáciles de configurar. El jaleo requerido para instalar un software, parchear servidores y hacer copias de seguridad de bases de datos, es reemplazado con una interfaz simple en la que sólo debes escribir una actualización de estado o seleccionar una imagen para cargar y pulsar un botón para compartirla con el mundo. Los usuarios sin conocimiento técnico probablemente no se vean capaces de instalar un nodo de GNU Social en un servidor, y luego configurar un registro DNS que permita que un nombre de dominio apunte al servidor. Sin embargo, rellenar un formulario en un dispositivo móvil o en un navegador web es una tarea más sencilla con la que muchos sí se pueden ver capaces.</p><p>Sin embargo, pese a lo que parece, las plataformas y servicios proporcionados por terceros no hacen más que almacenar datos en un ordenador que no podemos poseer. Cargamos datos en esos servicios y usamos esos programas en red porque nos prometen que harán lo mejor para poner nuestras imágenes y pensamientos al alcance de las personas con las que estamos conectados. La gente que se suscriba a nuestro canal de YouTube, será capaz de ver nuestro contenido en su lista de suscripciones. Sin embargo, como usuarios externos al sistema, realmente no controlamos la manera en la que estas plataformas almacenan, presentan o distribuyen nuestro contenido. Sólamente les alimentamos con nuevos datos para mantener la rueda girando. De modo que se comportan como <strong>silos de datos</strong>.</p><p>Algunos ejemplos de como esto puede tener consecuencias negativas:</p><ul><li><strong>Almacenamiento</strong>: ¿Recuerdan Vine? Años después de ser comprado por Twitter, la “tecnología” (el concepto de repetir un vídeo en bucle si es corto, más bien) fue incorporado en la plataforma de Twitter, para después cerrar el sitio. No se puede cargar contenido nuevo, pero sí es posible visualizar vídeos cargados, pero nadie sabe por cuánto tiempo. ¿Qué ocurre cuando un servicio muere? Afortunadamente, la mayoría de sitios hoy en día tienen un sistema de copias de seguridad que permite exportar datos de un sitio cuando se anuncia la fecha de cierre. Sin embargo, hay cosas, como las URLs, que no pueden ser exportadas, de modo que mueren con el resto del dominio web, provocando que los links se pudran.</li><li><strong>Distribución</strong>: en los últimos años, varias redes sociales han hecho <em>mejoras</em> a la forma en la que presentan los feeds con contenido nuevo a los que un usuario de una red social está suscrito. Ya no es suficiente con suscribirse a temas, personas y marcas que importan, porque ahora hay algoritmos que determinan cuando una actualización de estado o un contenido es lo suficientemente relevante como para enseñarlo en un feed o no. Algunas redes sociales han incorporado características como <em>campanitas</em>, <em>estrellas</em> o <em>favoritos</em> para señalizar a los algoritmos que realmente queremos recibir actualizaciones de estado de esas personas. De modo que te ves forzado a suscribirte dos veces a una persona para recibir su contenido.</li><li><strong>Presentación</strong>: ¿por qué todos los blogs de Medium se ven iguales? No tengo nada más que decir.</li></ul><p>Un montón de estos problemas no existirían si pudiésemos controlar el software que opera esas plataformas. Operando una web completa, como en los viejos tiempos, el almacenamiento, la distribución y la presentación de esos contenidos estaría de nuevo bajo nuestro control. No intento romantizar con cómo era la web antes de las redes sociales o con la Web 2.0, pero es imposible negar que, pese a que las redes sociales han permitido a más personas poder tener una identidad online para compartir información y pensamientos con otras personas, también se han llevado parte de la magia que teníamos anteriormente.</p><h3>IndieWeb: hagamos la web abierta y divertida otra vez</h3><p>Descubrí a <a href="https://indieweb.org/Main_Page">IndieWeb</a> el año pasado y me interesaron bastante las ideas que proponen. IndieWeb es un movimiento alternativo a la web cerrada y corporativa, basada en unas pocas ideas. Deberías poseer tu contenido, y publicarlo en un sitio que sea tuyo, porque no puede estar infinitamente a salvo cuando es administrado por una organización o un servicio de terceros fuera de tu control. La plataforma podría desaparecer, o tu cuenta podría quedar bloqueada o baneada por alguna razón arbitraria.</p><p>Además, tener un sitio web implica tener más libertad sobre la forma en la que se puede agregar y presentar contenido. <strong>No necesitas crear hilos en tu página web</strong> (como pasa en Twitter), porque no hay un límite arbitrario sobre el número de caracteres que puede tener una publicación. Puedes controlar cómo se ve el sitio. Puedes controlar la distribución de tu contenido usando links permanentes que durarán tanto como quieras; idealmente, infinitamente, dado que el alojamiento web y poseer un dominio es barato.</p><p>Sin embargo, <strong>no tienes por qué quedarte fuera de las redes sociales</strong> (salvo que así lo quieras). Hay modelos que te permiten publicar a la vez en tu propia web y en las redes sociales, con el objetivo de hacerlo accesible a amigos que todavía quieran usar esos sitios<a href="https://www.danirod.es/blog/2018/hoja-de-ruta-2018#fn:silo-users">1</a>. Puedes publicar una foto o una actualización de estado en tu página web, y luego hacer publicación cruzada con servicios de terceros como Twitter o Instagram. Simplemente agrega links a los tweets o a las fotos que apunten de vuelta a la URL de tu página web donde está la misma copia del contenido, y ya habrás establecido esa conexión entre ambas copias del mismo contenido.</p><p>Esto se conoce como <a href="https://indieweb.org/POSSE"><strong>POSSE</strong></a>: <em>Post on your Own Site, Syndicate Elsewhere</em> (que podríamos traducir como <em>Publica en tu Sitio, Sindica en Otras Redes</em>). <a href="https://brid.gy/">Hay herramientas</a> que te permiten hacer esto automáticamente, por ejemplo enviando una actualización de estado a Twitter cuando la publicas en tu propia página web. Sitios que tienen una API pública para desarrolladores hacen más fácil este proceso. De hecho, probablemente ya conozcas algunos servicios que hacen esto automáticamente, como YouTube publicando un tweet cada vez que cargas un nuevo vídeo, o Twitter enviando actualizaciones de estado a tu perfil de Facebook.</p><p>Sin embargo, para no depender infinitamente en el modelo POSSE, el <a href="https://www.w3.org/wiki/Socialwg">grupo de trabajo SocialWG de la W3C</a> ha trabajado en los últimos años en recomendaciones para protocolos que permiten agregar una capa social a páginas web. Esta capa es neutral, no pertenece a ninguna corporación, y no está asociada a ninguna red social en concreto. En su lugar, son protocolos abiertos y federados que una vez se agregan a una página web, permiten que esta se comunique con otras páginas web para disponer de ciertas funciones sociales típicamente presentes en redes mainstream<a href="https://www.danirod.es/blog/2018/hoja-de-ruta-2018#fn:mastodon">2</a>. Por ejemplo:</p><ul><li><a href="https://www.w3.org/TR/webmention/">Webmentions</a>: es la evolución de los pingbacks. Puedes usarlas para informar a otros sitios web que has enlazado a sus posts en los tuyos, tal vez como una cita, como una respuesta, como un like o como un repost. El operador del servidor tiene una ruta HTTP que recibe menciones web de otras webs, de modo que las pueda registrar para presentarlas, por ejemplo, debajo de la entrada original, como si fuesen comentarios en otras plataformas de blog.</li><li><a href="https://www.w3.org/TR/websub/">WebSub</a>: puede que conozcas Atom y RSS. Un cliente consulta un documento alojado en una web para comprobar si esa web tiene nuevo contenido. WebSub funciona igual pero en la dirección opuesta. Es el propietario de un feed el que se ocupa de notificar a los suscriptores cada vez que tiene algo nuevo que ofrecer. Los clientes se suscriben y se desuscriben a este feed informándole al servidor que quieren recibir actualizaciones o no del nuevo contenido. Esto es más eficiente porque evita la necesidad de que un agente de usuario esté comprobando continuamente si hay algo nuevo, cuando lo más probable es que si el volumen de actualizaciones no es elevado no haya nada, siendo el servidor el que se ocupa de comunicarle al mundo lo nuevo que tiene.</li><li><a href="https://www.w3.org/TR/micropub/">Micropub</a>: define un protocolo abierto para crear, actualizar y borrar posts usando un cliente. ¿Tienes una forma de agregar contenido a tu página web? Puede que tengas un escritorio de WordPress. O que hayas fabricado tu propio panel de control. O que publiques contenido escribiendo un archivo en una línea de comandos, o enviando un e-mail a una dirección automatizada. Da igual. Mientras tu web hable Micropub, cualquier cliente autorizado podrá crear publicaciones.</li><li><a href="https://indieauth.spec.indieweb.org/">IndieAuth</a>: es un protocolo de identificación construido sobre OAuth 2.0 que permite a los usuarios identificarse usando su sitio web, de manera similar a como otros servicios permiten a usuarios iniciar sesión con Facebook o Twitter. Es como OpenID, pero bien hecho.</li></ul><p>Hay servicios, como <a href="https://webmention.io/">webmention.io</a>, que hacen facilísimo integrar estas tecnologías en tu web porque ya están hechas. También, si estás fabricando tu página web desde cero en un lenguaje de programación, puedes usar alguna librería que implemente estos protocolos para agregar el soporte a tu web en poco tiempo. Sin embargo, también puede ser divertido como un reto de programación escribir tu propia implementación. Algunos protocolos tienen suites de pruebas para verificar que se ha implementado correctamente el protocolo. Comencé a trabajar en <a href="https://github.com/danirod/menta">un Plug para Elixir que agrega soporte para menciones web</a>, pero no lo he terminado y no he podido trabajar mucho en él últimamente. Pero está siendo un buen proyecto para practicar lo que estoy aprendiendo sobre el lenguaje de programación Elixir y para saber más sobre los Plugs de Elixir.</p><h3>Vale, pero ¿cuál es el plan para este año?</h3><p>Este año quiero reunir todo el contenido creado por mí que hay esparcido en distintos lugares de internet, siendo YouTube la única excepción por cuestiones de ancho de banda y de espacio en disco. Eso significa que quiero hacer mi contenido de Twitter, Instagram, Flickr y Google+ disponible a través de mi página web.</p><p>Luego, me aseguraré de que el nuevo contenido que publique en redes sociales sea publicado en su lugar en mi sitio web. No te darás cuenta de nada si me sigues en Twitter o Instagram, porque el contenido será simultáneamente sindicado mediante POSSE. Además, voy a seguir usando esas redes sociales y repartiendo likes y retweets a memes. Aunque la URL canónica para representar ese contenido compartido seguirá estando en mi propia página web.</p><p>Como reto de programación, quiero implementar algunas de las recomendaciones del grupo de trabajo SocialWG y luego agregarlas a mi página web.</p><h3>Tipos de publicación: notas, fotos y entrenamientos</h3><p>Quiero cerrar el agujero entre las redes sociales que uso y mi página web descentralizada este año. Igual que sitios como Facebook permiten tener múltiples tipos de publicación (actualizaciones de estado, fotos, vídeos, enlaces…), puedes hacer lo mismo con páginas web. De hecho, ya lo estoy haciendo. Algunas de mis publicaciones en esta web son artículos de blog y otras son marcadores en el linklog.</p><p>Este año quiero hacer cambios en el código fuente que hace funcionar mi página web para agregar los siguientes tipos de publicación:</p><ul><li><strong>Notas</strong>: similares a los tweets. Pequeñas actualizaciones de estado de no más de un par de frases que se pueden implementar como entradas de blog cortas sin título. A diferencia de Twitter y Mastodon, no hay límite de caracteres, pero hacerlas largas va en contra de su propósito.</li><li><strong>Fotos</strong>: no me gusta nada cómo la mayor parte de redes sociales de fotografía tratan las imágenes, porque sólo te dejan agregar una descripción a las fotos. Flickr es la excepción que parece permitir agregar título y descripción a las fotos. Dado que el propósito de la web abierta también es tener libertad para establecer mis propias normas, me gustaría tener todo y estar feliz. Quiero títulos de foto, quiero descripciones de foto, y si es posible, quiero texto alternativo en mis fotos.</li><li><strong>Entrenamientos</strong>: capturo un montón de información sobre mis entrenamientos con Runtastic. No voy a compartir datos de mapas en línea por las implicaciones para la privacidad que puede conllevar, pero sí considero que puede ser interesante tener publicaciones con los números, y conservar los mapas en privado, por si Runtastic desapareciese algún día.</li></ul><p>También estoy interesado en tipos de publicación adicionales. Igual que puedes informar a tus amigos en Facebook de programas de TV y películas que has visto o de álbumes que has escuchado, podría agregar soporte para los <em>scrobbles</em> (similares al sistema de scrobbling usado en Last.fm) para mantener un registro de los podcasts, álbumes de música u otro contenido audiovisual que haya visto, pero no es una prioridad en este momento, porque eso sería un montón de contenido que administrar.</p><h3>Importar más archivos</h3><p>En 2016 <a href="https://www.danirod.es/blog/2016/migrating-blog-posts-to-jekyll">importé una buena cantidad de entradas de blog procedentes de viejas web en danirod.es</a>. Una vez tenga soporte para nuevos tipos de publicación, me gustaría importar archivos de contenido procedente de otras redes sociales, con fines de copia de seguridad.</p><ul><li>Agregar fotos de mi feed de Instagram y Flickr a la sección Fotos. Algunas fotos compartidas en otras redes sociales, como Twitter o Google+, pueden entrar también.</li><li>Agregar datos de antiguos entrenamientos hechos con otras aplicaciones de fitness que he usado en el pasado. Usaba CardioTrainer hasta que se convirtió en Noom y cambió de modelo de negocio. De hecho, lo cambié por Endomondo hace tantos años que a estas alturas no sé si sigue funcionando o si el sitio ha muerto. Sin embargo, antes de irme descargué un montón de registros de entrenamientos corriendo y en bici mediante su sistema de exportado de datos, así que tengo eso. Esos archivos están en alguna parte de mi disco duro. Si los encontrase, los podría archivar aquí también.</li><li>Descargar la mayoría de mi historial de tweets y cargarlo en este sitio. Los tweets con foto pueden ser Fotos. Los tweets con enlaces pueden ser considerados Marcadores. Otros tweets serían notas regulares. Por ahora me parece oportuno dejar fuera de esta copia de seguridad las respuestas, retweets y tal vez citas, ya que causarían mucho ruido y tal vez haya problemas de copyright de por medio.</li></ul><h3>Agregar microformatos y enlaces rel=me</h3><p>Esto ya está hecho, por cierto. Puedes probarlo viendo el código fuente de esta página.</p><p>Los microformatos son un sistema para la web semántica basado en agregar metadatos a páginas web diseñadas para humanos. Con <em>diseñadas para humanos</em> me refiero a que son documentos HTML con contenido valioso para personas, como entradas de blog, noticias, una web personal, o datos sobre un evento. Un documento RDF o un documento JSON no está pensado para ser consumido primero por humanos.</p><p>Los microformatos son similares a otros formatos como RDFa, OpenGraph, JSON+LD o Schema.org, y funcionan agregando marcas HTML invisibles y simples a documentos para anotar información sobre ellos. SIn embargo, Microformatos está pensado como una tecnología que permite generar, ya no sólo documentos válidos en HTML5, sino documentos válidos en HTML4 y XHTML 1.0, para sitios web un poco más antiguos o con requisitos particulares.</p><p>Tomemos el siguiente código HTML:</p><pre>&lt;p&gt;Mi nombre es Ana Pérez.&lt;/p&gt;</pre><p>Con un poco de marcado invisible, podemos facilitar a software no humano reconocer que me llamo Ana Pérez.</p><pre>&lt;p class=&quot;h-card&quot;&gt;Mi nombre es &lt;span class=&quot;p-name&quot;&gt;Ana Pérez&lt;/span&gt;.&lt;/p&gt;</pre><p>h-card es un microformato que representa una tarjeta de contacto. Permite describir información sobre una persona o sobre una organización. Cada microformato tiene propiedades. Una de ellas es p-name, que se usa para describir el nombre de una persona. Este documento sigue siendo legible por humanos, pero ahora los robots pueden extraer información sin necesidad de usar heurísticas o de deducir la información de otro modo.</p><p>Si estás leyendo este post dentro de danirod.es, podrás comprobar que esta entrada de blog está embutida dentro de una etiqueta con la clase h-entry, que es la que se usa para las entradas (como las entradas de blog). Este texto está metido dentro de una etiqueta e-content (el contenido de la entrada de blog). Además, la cabecera y el pie de página de la entrada tiene más clases agregadas al título, la fecha de publicación, la URL y las etiquetas. Todas estas clases ayudan a un ordenador a detectar correctamente todos los metadatos sobre una entrada de blog.</p><p>h-entry es usado, por ejemplo, en servidores de webmentions, de tal modo que cuando son informados de que cierta URL les ha mencionado, la visitan para extraer los datos del post y mostrar el título y el autor, como si fuese un comentario en una entrada de blog.</p><p>Además, también he agregado enlaces de tipo rel=me a la etiqueta &lt;head&gt; de mi plantilla. rel=me es un tipo de relación XFN usada en enlaces (&lt;a&gt;, &lt;link&gt; y &lt;area&gt;) para indicar que la dirección a la que apunta ese enlace se corresponde con otra dirección mía. Por ejemplo, uso rel=me para marcar mis otros perfiles en redes sociales, dado que esas URLs también son <em>mis</em> perfiles:</p><pre>&lt;link rel=&quot;me&quot; title=&quot;Twitter&quot; href=&quot;https://twitter.com/danirod93&quot;&gt; &lt;link rel=&quot;me&quot; title=&quot;LinkedIn&quot; href=&quot;https://linkedin.com/in/danirod&quot;&gt; &lt;link rel=&quot;me&quot; title=&quot;GitHub&quot; href=&quot;https://github.com/danirod&quot;&gt;</pre><h3>Implementar algunas recomendaciones del SocialWG</h3><p>Por programar cosas, querría implementar algunos endpoints o microservicios e implementar algunas recomendaciones del SocialWG. Podría usar un servicio ya existente para esto, o una librería, pero me parece más divertido hacerlo todo por mi cuenta para programar más.</p><p>Quiero implementar lo siguiente:</p><ul><li>Webmentions: es fácil si continúo trabajando en Menta. Tal vez no me lleve demasiado.</li><li>Micropub: no quiero escribir un panel de control o un dashboard si voy a ser el único usuario del sistema. En su lugar, prefiero desacoplar la escritura de la web y tener un endpoint micropub y un cliente micropub para escribir nuevas actualizaciones de estado.</li><li>WebSub: parece muy útil, incluso lo podría reusar en otros proyectos.</li><li>IndieAuth: lo requeriré para agregar Micropub.</li></ul><h3>Conclusiones</h3><p>Sé que ha sido una entrada de blog un poco larga (heh, por eso no es una nota), pero quería proporcionar un poco más de contexto en mi hoja de ruta para ayudar a lectores a entender de qué estoy hablando. Además, si consigo inspirar a otras personas para que hagan esfuerzos similares con sus identidades en línea, sería mejor.</p><p>Hemos oído de Tim Berners-Lee, creador de la World Wide Web, <a href="https://www.theguardian.com/technology/2017/mar/11/tim-berners-lee-web-inventor-save-internet">en artículos publicados en los últimos años</a> ligeramente incómodo con la dirección que la web está tomando. La web hoy en día es cerrada, controlada por unas cuantas corporaciones. Cosas como la neutralidad de la red o el geobloqueo tampoco es que hagan mucho por facilitar las cosas.</p><p>Aquellos que tengan el conocimiento y las herramientas para hacer su pequeña contribución a arreglar una internet rota, deberían trabajar en arreglarlo. Esta es mi pequeña contribución.</p><p><em>Originally published at </em><a href="https://www.danirod.es/blog/2018/hoja-de-ruta-2018"><em>www.danirod.es</em></a><em> on January 16, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c29a51560b81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Roadmap for 2018 for danirod.es: embrace the open web]]></title>
            <link>https://medium.com/@danirod/roadmap-for-2018-for-danirod-es-embrace-the-open-web-20791ede949b?source=rss-164c9db04fa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/20791ede949b</guid>
            <category><![CDATA[open-web]]></category>
            <category><![CDATA[indieweb]]></category>
            <category><![CDATA[microformats]]></category>
            <dc:creator><![CDATA[Dani Rodríguez]]></dc:creator>
            <pubDate>Tue, 16 Jan 2018 20:01:00 GMT</pubDate>
            <atom:updated>2018-01-16T21:41:15.185Z</atom:updated>
            <content:encoded><![CDATA[<p>This year, I want to make danirod.es my main online identity and stop relying so much on social networks for hosting my content, such as my photos or my status updates. This will not change the use I make of social networks, so if you follow me on social networks, not much will be noticeable. This blog post will help me control the list of changes and features I’ll add to my website through the year in order to make it open, federated, and independent.</p><h3>Context: social networks and the closed web</h3><p>Mainstream social networks are used because they are convenient and easy to set up. The hassle required for installing software, patching servers and doing database backups, is replaced with a simple interface where you just have to write a status update or select a picture to upload, and press a button to share it with the world. Some non-technical users may not have the skills to install a GNU Social node in a VPS, and then set up a DNS record to make a domain name point to the VPS server. However, filling a form on a mobile device or a web browser is an easier abstraction that more people can cope with.</p><p>Despite of what it looks like, third party platforms and services are nothing but storing data on a computer we don’t own. We upload data to these services because they promise us they will do their best to make our pictures and thoughts reachable to people we are connected with. People who are subscribed to our updates on YouTube will be able to see our new content in their subscription stream. However, as outsiders, we don’t actually control the way they store, present or distribute our content. We just feed them with new data to keep the system spinning. So they behave like <strong>data silos</strong>.</p><p>A few examples on the problems this has:</p><ul><li><strong>Storage</strong>: Remember Vine? Years after being bought by Twitter, their technology (playing short videos in a loop) was added to the Twitter platform, and they got rid of the site. It’s read only, so you cannot upload new content, although existing content can still be browsed, but who knows for how long. What happens when a service dies? Fortunately, most sites these days have a backup system that allows user to download their data once a site announces its shutdown. However, permalinks rot, they cannot be backed up.</li><li><strong>Distribution</strong>: A lot of social networks made <em>improvements</em> to their feeds in the recent years. It’s not enough to subscribe for updates from people or brands we care about. An algorithm will decide whether an update status is worthy enough to have it on our feed or not. Some social networks now have features like <em>bells</em>, <em>stars</em> or <em>favourites</em>, to signal the algorithm we actually want to receive updates from these people. So, you have to subscribe twice to get content from your network.</li><li><strong>Presentation</strong>: Why does every Medium site have to look the same? Nothing else to say here.</li></ul><p>A lot of these problems would not be an issue if we could control the software that drives these platforms. By owning a fully featured website, like in the old days, storage, distribution, and presentation, is under our control. I’m not trying to romanticise how the web was before social networks or the Web 2.0, but it’s impossible to deny that, while social networks have lowered the barrier for having an identity online for sharing thoughts and information with people around us, they’ve also removed some of the internet magic we used to have before.</p><h3>IndieWeb: let’s make the web open and fun again</h3><p>I first learned about <a href="https://indieweb.org/Main_Page">IndieWeb</a> last year and got interesed by the ideas they propose. IndieWeb is an alternative movement to the closed and corporate web, based in a few ideas. You should own your content and post it on a site that you own, because it cannot be forever safe when it’s managed by a company or third party service that it’s outside of your control. The platform could dissappear or your account could get locked or banned by some arbitrary reason.</p><p>Plus, having a site means more freedom on how to add and manage your content. <strong>You don’t need Twitter threads in your site</strong>, because there is no arbitrary character limit on posts made on your site. You can control how your site looks. You can control the distribution of your content by using reliable permalinks that will last as long as you want, ideally forever considering that hosting is cheap.</p><p>However, <strong>you don’t have to stay out of the loop of social networks</strong> (unless you want). There are models on how to publish both to your site and to social networks, to make it available to your friends who would still want to use those sites<a href="https://www.danirod.es/blog/2018/roadmap-for-2018#fn:silo-users">1</a>. You can post a photo or a status update to your site, and then cross-post it to a third party site like Twitter or Instagram. Just make sure to add links on your tweets or photos that point back to the same content in your site to set up the connection between both copies of the same content.</p><p>This is known as <a href="https://indieweb.org/POSSE"><strong>POSSE</strong></a>: <em>Post on your Own Site, Syndicate Elsewhere</em>. <a href="https://brid.gy/">There are tools</a> for doing this automatically, such as automatically sending your status update to Twitter once you post it to your site. Sites that have a public API make this process easier. In fact, you probably know of a few services that automatically do this, such as YouTube sharing a link on Twitter when you upload a new video or Twitter sending status updates to your Facebook profile.</p><p>However, in order not to rely forever on POSSE, the <a href="https://www.w3.org/wiki/Socialwg">W3C Social Web Working Group</a> has been releasing in the last couple of years a few recommendations for protocols that add a social layer to websites. This social layer is neutral, not owned by a corporation, and not associated to a particular social network. Instead, these are open and federated protocols that once added to an open website, allows it to talk to other open websites in order to have some social features usually present in mainstream social networks<a href="https://www.danirod.es/blog/2018/roadmap-for-2018#fn:mastodon">2</a>. For instance:</p><ul><li><a href="https://www.w3.org/TR/webmention/">Webmentions</a>: this is the evolution of pingbacks. You can use them to tell other websites you’ve linked them in your posts, maybe as a cite, as a reply or as a like or a repost. The server operator will be notified of the URL that made the mention, and it can register it to display it under the original blog post, similar to how other comment systems work.</li><li><a href="https://www.w3.org/TR/websub/">WebSub</a>: You may know how Atom or RSS works. An user agent fetches a document hosted in a different server and reads it to find if there is new content available (like blog posts or photos). WebSub works the same but it’s the opposite direction. The owner of a feed will take care of notifying subscribers whenever the feed is updated. Clients subscribe and unsubscribe to the content source. This is more efficient because it avoids the need of polling a server all the time to check for new content. Instead, it’s the server who will tell the world about new content.</li><li><a href="https://www.w3.org/TR/micropub/">Micropub</a>: it defines an open protocol for creating, updating and deleting posts using third party clients. How do you add content to your website? Do you have a WordPress admin panel, a self-crafted dashboard, or you use a command line or email to write posts? It doesn’t matter. As long as it talks Micropub, any other third party (authorized) client can create posts.</li><li><a href="https://indieauth.spec.indieweb.org/">IndieAuth</a>: it’s an identity system built on top of OAuth 2.0 that allows users to identify themselves using their site, similar to how many other services let users identify themselves using a Facebook or Twitter account. It’s similar to OpenID.</li></ul><p>There are a few services, like <a href="https://webmention.io/">webmention.io</a>, that make easy to set up a working implementation in a breeze. Also, in case you’re building your own website from scratch, there are a few libraries that already implement this protocol. However, it may also be fun or as a coding challenge, to write your own implementation. Some protocols have test suites to verify they implement properly the spec. I started working on <a href="https://github.com/danirod/menta">an Elixir Plug that adds support for webmentions</a>, although it’s not finished yet and I haven’t actually worked on it for the last month, but it’s a good project to practice what I’m learning about Elixir and to know more about Elixir Plugs.</p><h3>Okay, so what’s the plan this year?</h3><p>This year, I want to reunite in my site content previously spread in my multiple social networks, being YouTube the only exception I’ll make at the moment, because the bandwidth and storage costs would be too high. This means making my old Twitter, Instagram, Flickr and Google+ content available through my website.</p><p>Then, I’ll make sure that new content posted on social media is posted instead on my site. You won’t notice nothing if you are following me on Twitter or Instagram because the content will be syndicated at the same time through POSSE, plus I’ll keep using those social networks and liking and retweeting memes, but there will be a canonical permalink and a copy of the content I make on my website.</p><p>As a coding challenge, I want to implement some of the recommendations of the W3C Social Web WG and add them to my website.</p><h3>Post types: notes, photos and workouts</h3><p>I want to close the gap between some social networks I use and my decentralized website this year. Just like sites such as Facebook have multiple types of publications (status updates, photos, videos, links…), you can do the same with regular websites. In fact, I’m already doing this in my site. Some posts are blog posts, some other are linklog bookmarks.</p><p>This year I’ll tweak the source code that makes my website work in order to add support for the following things:</p><ul><li><strong>Notes</strong>: they are similar to tweets. Short status updates, implemented as title-less blog posts. They have no character limits, unlike their Twitter or Mastodon equivalents, but they are intended to be used for short posts, such as a few sentences or lines. They are the easiest to cross-post to Twitter.</li><li><strong>Photos</strong>: I seriously dislike how most social networks only let posters add a description to photos. Flickr is the exception, allowing photos to have both a title and captions. Since the whole point of using open web is setting my own rules instead of accepting rules of other platforms, I can have both and be happy about it. I want titles and I want descriptions, and if possible, I want alternative text added to my photos.</li><li><strong>Workouts</strong>: I capture a lot of data of my workouts using Runtastic. I’m not probably sharing maps data because of the privacy implications that would have, but I think having a public log of the numbers I make may be useful, in case Runtastic ever dissapears.</li></ul><p>I’m also interested in additional posts. You can tell your friends on Facebook shows and movies you’ve watched or music albums you’ve heard. I could add support for <em>scrobbles</em> (similar to the scrobbling system made by Last.fm), to keep track of podcasts, albums and other AV content I’ve seen, but it’s not a priority at the moment, since that would be a lot of content to keep track of.</p><h3>Pull more backlog archives</h3><p>In 2016 <a href="https://www.danirod.es/blog/2016/migrating-blog-posts-to-jekyll">I added a backlog of blog posts from old websites into my site</a>. Once I have support for more post types, I’d like to import a backlog of content coming from other social networks, for backup purposes.</p><ul><li>Adding photos from my Instagram and Flickr accounts into the photos section. Maybe some photos shared in other social networks such as Twitter or Google+.</li><li>Adding some old workouts from old fitness apps I used. CardioTrainer became Noom, and then it changed their business model. In fact, I replaced it with Endomondo years ago, so I don’t even know if they’re still running or if the site is dead. However, I downloaded before leaving a stash of running and biking workouts using their export assistant, so there’s that. All those files are lying somewhere in my hard drive. If I found them, I could store them here.</li><li>Pull most of my Twitter status updates into my site. Tweets with photos would be considered photos, tweets with links would be considered bookmarks, other tweets would be considered regular notes. I’m leaving replies, retweets, and probably quotes outside of this import because that’s a lot of noise and probably it’s copyright infringement.</li></ul><p>This has actually been already done. You can test this by looking at the source code of this website.</p><p>Microformats is a semantic web system for adding metadata into pages designed for humans. <em>Designed for humans</em> means that it’s an HTML document with valuable content for humans, such as blog posts, news articles, a personal website or some event information. An RDF or a JSON document is not designed for humans.</p><p>Microformats is similar to other formats such as RDFa, OpenGraph, JSON+LD or Schema.org, and it works by adding some invisible and simple HTML markup to these documents to tag properties about things. However, Microformats are designed to be extensible and they produce valid HTML 5 and even HTML 4 or XHTML 1.0 code.</p><p>Take the following HTML code:</p><pre>&lt;p&gt;My name is John Doe.&lt;/p&gt;</pre><p>You could add some invisible markup to make easier to non-human user agents to detect that my name is John Doe:</p><pre>&lt;p class=&quot;h-card&quot;&gt;My name is &lt;span class=&quot;p-name&quot;&gt;John Doe&lt;/span&gt;.&lt;/p&gt;</pre><p>h-card is a microformat that represents a contact card. It’s used to describe information about a person or an organization. Each microformat has a list of properties. One of them is p-name, which is used to describe a person name. This document is still readable by humans, but computers can extract information as well without the need of heuristics or other kinds of guesses.</p><p>If you’re reading this blog post inside danirod.es, you’ll notice this blog post content is wrapped inside a tag with the class h-entry applied, which is the class used for entries (such as blog posts). This text is wrapped inside an e-content tag (it’s the contents of the blog post), and the header and footer has several other class names added to the title, the publication date, the URL and the tags. All these items help a computer detect the metadata for this blog post and present it.</p><p>h-entry can be used by a webmentions server to extract information about an URL that is linking to a blog post, such as the title or the author name, to pretty print it. It’s also used by micropub for providing the contents of the blog post that it’s being created.</p><p>Additionally, I added rel=me tags to the &lt;head&gt; node of the template used in my site. rel=me is a relationship value from XFN, used in links (&lt;a&gt;, &lt;link&gt; and &lt;area&gt; tags). When I tag a link using rel=me, it means that the destination of such link is another web address of mine. For instance, I use rel=me tags on this site to mark my profiles on social networks, since those profiles are also <em>mine</em>:</p><pre>&lt;link rel=&quot;me&quot; title=&quot;Twitter&quot; href=&quot;https://twitter.com/danirod93&quot;&gt; &lt;link rel=&quot;me&quot; title=&quot;LinkedIn&quot; href=&quot;https://linkedin.com/in/danirod&quot;&gt; &lt;link rel=&quot;me&quot; title=&quot;GitHub&quot; href=&quot;https://github.com/danirod&quot;&gt;</pre><h3>Implementing some SocialWG Recommendations</h3><p>For the sake of programming stuff, I want to write a few endpoints or microservices implementing SocialWG recommendations. I could use a hosted service for this, or use an already existing library, but I think it will be more of a challenge if I write the tools by myself.</p><p>I want to write a microservice or implementation for the following recommendations:</p><ul><li>Webmentions: easy if I start working on Menta again. Might not take a lot of time.</li><li>Micropub: I don’t want to write a dashboard or an admin panel if I’ll be the single user of the system. Instead, decoupling the admin panel and having a micropub endpoint and a micropub client for writing such content would be much better.</li><li>WebSub: looks extremely useful; may even reuse it for other projects.</li><li>IndieAuth: probably required to implement a micropub endpoint.</li></ul><h3>Conclusion</h3><p>I know this has been a long blog post (heh, that’s why this is not a note), but I wanted to provide some additional context on my roadmap in order to help readers understand what I’m talking about. If I’m able to inspire other people to do a similar effort and to start building an open web, it would be better.</p><p>Tim Berners-Lee, creator of the World Wide Web, <a href="https://www.theguardian.com/technology/2017/mar/11/tim-berners-lee-web-inventor-save-internet">has been seen in articles</a> in the last couple of years slightly uncomfortable with the way the web is going. The web today is closed, and it’s controled by a few corporations. Things such as net neutrality and geo blocking are not making things easier.</p><p>Those who have the knowledge and the resources to do their small contribution on fixing the currently broken internet should work on fix it. This is my small contribution.</p><p><em>Originally published at </em><a href="https://www.danirod.es/blog/2018/roadmap-for-2018"><em>www.danirod.es</em></a><em> on January 16, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20791ede949b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Receive SSH login notifications through Slack or Discord]]></title>
            <link>https://medium.com/@danirod/receive-ssh-login-notifications-through-slack-or-discord-fe30a4da3574?source=rss-164c9db04fa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe30a4da3574</guid>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[webhooks]]></category>
            <dc:creator><![CDATA[Dani Rodríguez]]></dc:creator>
            <pubDate>Fri, 13 Oct 2017 18:29:00 GMT</pubDate>
            <atom:updated>2017-10-14T16:11:43.514Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<p>I have a problem. Sometimes I’m slightly paranoid about computer security. When I’m on my university network I wonder if web requests made to websites not using HTTPS are being logged. Sometimes I wonder if a local server running on my laptop is being exposed to a public network when I’m not at home. And when it comes to my server, sometimes I wonder if I’m actually <em>alone</em>.</p><p>I follow secure practices both for my SSH server and for the appliations that run on it. I check the logs regularly. Yet, if someone is clever enough to break-in into my server, they may just wipe the footprints from the logs as well. Critical logs should not live on the same server you are trying to protect, otherwise the logs are not at a lower risk of being tampered.</p><p>Considering my smartphone already has a bunch of chat applications, it would be cool to receive an IM notification on Slack or Discord whenever a log in attempt is done. Let’s see how to do this using webhooks: I’ll write a program that pings an HTTP webhook, and I’ll run that program every time someone logs in via SSH through PAM.</p><h3>Set up the Slack/Discord webhook</h3><p>Both Slack and Discord support webhooks. Webhooks are URL endpoints associated to your server. Using an HTTP client or library, you can make a POST request to that URL endpoint providing some multimedia payload as a parameter: text, but also images, files or embedded data. Whatever you send as a payload, it will appear on your server.</p><p><a href="https://api.slack.com/incoming-webhooks">Here are the instructions</a> for setting up a webhook in Slack, and <a href="https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks">here are the instructions</a> for Discord. Here is the Discord webhook I made:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/0*aVKMs-mhTV2EJWpm.png" /><figcaption>I made a webhook named “sample hook” that is able to send messages to the #server-status channel.</figcaption></figure><p>The cool thing about webhooks is that they work on any program that can make HTTP requests. You can even test your webhook using curl:</p><pre>λ ~/ curl -X POST \ &gt; -H &#39;Content-Type: application/json&#39; \<br>&gt; -d &#39;{&quot;content&quot;: &quot;Hello world, I am a hook!&quot;}&#39; \<br>&gt; <a href="https://discordapp.com/api/webhooks/...">https://discordapp.com/api/webhooks/...</a></pre><p>If you place the proper webhook URL, you will see a message sent through a bot appear on your server chat. The same thing goes for Slack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/0*207kekBlAK9LMA1n.png" /><figcaption>Running the webhook results in a message being posted in the server chat by a bot.</figcaption></figure><h3>Setting up a PAM rule</h3><p><strong>Note: while the changes I’ll make are not dangerous, you should use a VM instead of a production server if you don’t want to trust some internet guy.</strong></p><p><a href="https://en.wikipedia.org/wiki/Pluggable_authentication_module">PAM</a> is a framework for many UNIX flavours, including GNU/Linux and macOS, for creating authentication modules that allows the system to perform advanced login strategies, like forcing users to log in through hardware keys or using two factor authentication.</p><p>One of these modules is pam_exec.so. It can run a program on different stages of the server lifecycle, such as after a successful login is made or after a logout. This program will receive information about the login event, including the user and the hostname, if the login is made remotely.</p><p>To add an execution rule that will run a program every time a successful log in is done through SSH, add the following information to your /etc/pam.d/sshd file — this file contains the PAM rules triggered during SSH login:</p><pre>session  optional  pam_exec.so  /usr/local/sbin/sshd-login</pre><p>PAM configuration files, like many other UNIX configuration files, contain whitespace-separated values. Every word in a rule is an argument for that rule. There is a comprehensive explanation about these arguments on <a href="https://en.wikipedia.org/wiki/Pluggable_authentication_module">pam.d(5)</a>, but the most important things to grasp here is that <strong>session</strong> rules will trigger before and after an user is given service. The program I’m trying to execute is /usr/local/sbin/sshd-login.</p><h3>Wiring the program to the endpoint</h3><p>Let’s make a program that sends information about the login event to a Discord webhook. Or to a Slack server, although the parameters may change.</p><p>When pam_exec.so executes the program, it provides some information about the login event, such as the logged in user or the remote host that made the login attempt, through environment variables. Some of these environment variables are PAM_USER and PAM_RHOST. You can find more information in the manpage for <a href="https://linux.die.net/man/5/pam.d">pam_exec(8)</a>.</p><p>sshd-login — my program — will wrap the values for those variables into a JSON payload and perform an HTTP request using curl to send the payload to the webhook. The script is so simple that it can be written using bash:</p><pre>#!/bin/bash</pre><pre>WEBHOOK_URL=&quot;https://discordapp.com:443/api/webhooks/&lt;hook URL&gt;&quot;</pre><pre># Let&#39;s capture only open_session and close_session events (login and logout).<br>case &quot;$PAM_TYPE&quot; in<br>     open_session)<br>         PAYLOAD=&quot; { \&quot;content\&quot;: \&quot;$PAM_USER logged in (remote host: $PAM_RHOST).\&quot; }&quot;<br>         ;;<br>     close_session)<br>         PAYLOAD=&quot; { \&quot;content\&quot;: \&quot;$PAM_USER logged out (remote host: $PAM_RHOST).\&quot; }&quot;<br>         ;;<br>esac</pre><pre># Let&#39;s only perform a request if there is an actual payload to send.<br>if [ -n &quot;$PAYLOAD&quot; ] ; then<br>     curl -X POST -H &#39;Content-Type: application/json&#39; -d &quot;$PAYLOAD&quot; &quot;$WEBHOOK_URL&quot;<br>fi</pre><p>Despite I like shell scripts, escaping JSON quotes in a shell script is hell. If you are going to make a more complex script, I strongly suggest you to use a different scripting language such as Ruby or Python, which make easier to write and send JSON payloads.</p><p>Make this file executable.</p><p>Let’s test this. When pam_exec.so executes this file during a login, $PAM_USER will contain the username; $PAM_RHOST, the remote hostname and $PAM_TYPE will equal open_session. During log out, it works the same but $PAM_TYPE will equal close_session. Run the following programs on your terminal, and check that the hooks are triggering on your chat room.</p><pre>PAM_USER=foo PAM_RHOST=bar PAM_TYPE=open_session /usr/local/sbin/sshd-login<br>PAM_USER=foo PAM_RHOST=bar PAM_TYPE=close_session /usr/local/sbin/sshd-login</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/0*TXVWkjvbsG6qreRQ.png" /><figcaption>The result of this test.</figcaption></figure><p>Now open a new shell window or tab and log in to your server. You should see your real username and host appearing on the chat log. Try to log out as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*QhIoxXDgZd9J-LES.png" /><figcaption>Oh my god, it knows me!</figcaption></figure><h3>Conclusion</h3><p>I made a PAM rule that runs a program whenever someone logs in or logs out via SSH into my server. The executed program takes a few environment variables provided by PAM with information about the login event and sends them to my Discord server into a private channel using a webhook.</p><p>Webhooks are extremely cool because of the multiple use cases they have. They are available both in Discord and Slack. I also made a similar shell script that triggers a Slack webhook on the server at work, so that I can be less paranoid about that server as well.</p><p>One thing to notice is that this will only track <strong>successful</strong> login events. I haven’t found a way to track unsuccessful login events yet. However, I’d rather don’t track those events. Servers exposed to the internet will eventually receive the visit of vulnerability scanners and botnets. Assuming you have a proper security police, they will fail. However, these break-in attempts will still be logged, adding noise into your channel. I only want to get notified on successful logins. This way, if I ever receive a message on this channel and I’m not in front of my computer, I can be sure that things got fu***d up.</p><p><em>Originally published at </em><a href="https://www.danirod.es/blog/linux/receive-sshd-login-notifications/"><em>www.danirod.es</em></a><em> on October 13, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe30a4da3574" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>