Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBkC4-00029c-2J for pgsql-bugs@arkaria.postgresql.org; Fri, 19 May 2017 15:51:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dBkC3-0007bG-LR for pgsql-bugs@arkaria.postgresql.org; Fri, 19 May 2017 15:51:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dBkBM-0005rN-Ap for pgsql-bugs@postgresql.org; Fri, 19 May 2017 15:51:12 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dBkBJ-0001L0-8P for pgsql-bugs@postgresql.org; Fri, 19 May 2017 15:51:11 +0000 Received: by mail-qk0-x235.google.com with SMTP id y201so64380953qka.0 for ; Fri, 19 May 2017 08:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=on43J78+owhOX59D4EGTBSnnOInVp1zWh29l4J+d+rQ=; b=c4I9o+JF7gsYntnI0V5iennBd+eO6KMh6N17D1jDWjhV6MZzJW9VJ2XwDZB15J6p/w 7tW3QuuEZLf8FxvP1I47vUl2YWQomq/5RGD/038oics7WVb5/Xg4K5OypcZfjqFYQku4 LIa2kXhZMpQ3NO/x4Y2mS2hLaMmMF0zMgoe5HcwcT+P9q/ZpreHFo9D8o1g94pNJ0j1U 9wzP+kdgDxHIEMBPH1qlrKt+FbiAF+Z/lxWLOSNy1JE8vCer0qVww+0CGBGaYCGPouqD nLIYH8ZmywuSKKPJrDUtUx9MB6vPOmIL0Cu2k8czETv51KYMJx9DAo2TtPB3MntnPf2c B98g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=on43J78+owhOX59D4EGTBSnnOInVp1zWh29l4J+d+rQ=; b=lbcrAoL0zIykHERS6Oz5mOV0bomv2monZ/5BaOmuBep64S5Sj1v3//kKxwBgb7rpBR 0AZcAZ6AeIVeKfgO0OO8gvHqtOQ0rKTSGBm78ZpLQG0FmbIj0OcTeJym8+NTZ9wq4vJk Y1P1jP04pNirpttbGSqQGROXeA+qd9M8I1JpSmhmLHyduLOl7uOgnhdOZuPXTL9ml9sp UEtec/Uqjx0sESl1+fYRzgRzs3TitZvVKLQcpAqp65D7/9ClcA6TkiLJv8KsInN/skdf AHaf50BHRs9YES02vjB7n1IBSE0RNYw8bB+XGt8Ae49rptEjmice8UevmEIPQ9iS0tW3 dLug== X-Gm-Message-State: AODbwcDZD37BoDQszYPKgKPmQV+bdHlxuUXxrPi2oKSGAiRLCZtkGw6h 08n9+lposuNovg== X-Received: by 10.55.161.14 with SMTP id k14mr10009063qke.33.1495209068578; Fri, 19 May 2017 08:51:08 -0700 (PDT) Received: from [192.112.10.245] ([190.153.169.170]) by smtp.gmail.com with ESMTPSA id s32sm6055244qtg.2.2017.05.19.08.51.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 08:51:07 -0700 (PDT) Subject: Re: BUG #14661: authentication behavior(SCRAM-MD5) To: Heikki Linnakangas , pgsql-bugs@postgresql.org References: <20170519150511.29944.47622@wrigleys.postgresql.org> From: Anthony Sotolongo Message-ID: Date: Fri, 19 May 2017 11:51:06 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: es-ES X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Thanks!!! :D On 19/05/17 11:47, Heikki Linnakangas wrote: > On 05/19/2017 06:05 PM, asotolongo@gmail.com wrote: >> i think that is correct, but when i have the next configuracion: >> pg_hba.conf >> host all usuario 0.0.0.0/0 md5 >> host all postgres 0.0.0.0/0 md5 >> >> and my user with SCRAM encryption >> postgres=# select usename,passwd from pg_shadow ; >> usename | >> passwd >> ----------+------------------------------------------------------------------------------------------------------------------------------- >> >> usuario | >> SCRAM-SHA-256$4096:Fhqo2W7V4FlVQk7+$fkQJ02YBGMhePbhVnKOcHjON/VPUTDzT/pZboiwHofY=:XliKl0leu/kpN4ZGmNPnHKKWj76f7qN8lIjrY8jOVcA= >> >> postgres | >> SCRAM-SHA-256$4096:5DcjppjZNyrGb0Jo$iomUsf0Mo0RSSjkwzhwHwRphhVG5EKLRRMVp/eiENuI=:XFIOQcd1nA1IKclPrVSwFym9N5dLuYB43CfI3Lf5zGA= >> >> (2 filas) >> >> >> and when try to login, login successfully >> is correct this behavior? > > Yeah, "md5" in pg_hba.conf really means "md5 or scram-sha-256, > depending on what kind of password hash the user has". > > The documentation at > https://www.postgresql.org/docs/devel/static/auth-methods.html#auth-password > tries to explain it: > >> scram-sha-256 performs SCRAM-SHA-256 authentication, as described in >> RFC5802. It is a challenge-response scheme, that prevents password >> sniffing on untrusted connections. It is more secure than the md5 >> method, but might not be supported by older clients. >> >> md5 allows falling back to a less secure challenge-response mechanism >> for those users with an MD5 hashed password. The fallback mechanism >> also prevents password sniffing, but provides no protection if an >> attacker manages to steal the password hash from the server, and it >> cannot be used with the db_user_namespace feature. For all other >> users, md5 works the same as scram-sha-256. > > > - Heikki > -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs